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

This is another type of parsing that will return a value that is a discriminated union of the success and failure cases. https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes-func.html#discriminated-unions

Parameters

value: A

Returns

{ value: B; } | { error: ISimpleParsedError; }