Skip to main content
Go to Latest
method matches.Parser.prototype.refine
Re-export
import { matches } from "https://deno.land/x/embassyd_sdk@v0.3.1.1.4/mod.ts";
const { Parser } = matches;

We want to refine to a new type given an original type, like isEven, or casting to a more specific type

Type Parameters

optional
C = B

Parameters

refinementTest: (value: B) => value is B & C
optional
otherName: string = [UNSUPPORTED]

Returns

Parser<A, B & C>