Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ts_matches/src/matches.ts>Validator#castPromise

Being able to pattern match in typescript
Go to Latest
method Validator.prototype.castPromise
Re-export
import { Validator } from "https://deno.land/x/ts_matches@v5.2.1/src/matches.ts";

This is the like the unsafe parser, it assumes the happy path and will throw and return a failed promise during failure.

Parameters

value: A

Returns

Promise<B>