Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ts_matches/src/matches.ts>literals

Being able to pattern match in typescript
Go to Latest
function literals
Re-export
import { literals } from "https://deno.land/x/ts_matches@v5.2.0/src/matches.ts";

Type Parameters

A extends
| string
| number
| boolean
| null
| undefined
Rest extends Array<
| string
| number
| boolean
| null
| undefined
>

Parameters

firstValue: A
...restValues: Rest

Returns

Parser<unknown, A | OneOf<Rest>>