Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
method matches.Parser.prototype.enumParsed
Re-export
import { matches } from "https://deno.land/x/embassyd_sdk@v0.3.3.0.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; }