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

x/ts_matches/src/parsers/index.ts>IsAParser

Being able to pattern match in typescript
Go to Latest
class IsAParser
implements IParser<A, B>
import { IsAParser } from "https://deno.land/x/ts_matches@v5.2.0/src/parsers/index.ts";

Constructors

new
IsAParser(
checkIsA: (value: A) => value is A & B,
typeName: string,
description?,
)

Methods

parse<C, D>(a: A, onParse: OnParse<A, B, C, D>): C | D