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

expectOk

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

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

§Type Parameters

§Parameters

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

§Return Type