Skip to main content
Module

x/ts_matches/src/parsers/guard-parser.ts>GuardParser

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

Constructors

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

Methods

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