Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

expectErr

Return input as E if the passed input is Err(E). Otherwise, throw TypeError with the passed msg.

function expectErr<T, E>(input: Result<T, E>, msg: string): E;
§
expectErr<T, E>(input: Result<T, E>, msg: string): E
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
msg: string
[src]

§Return Type