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

expectSome

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

function expectSome<T>(input: Option<T>, msg: string): T;
§
expectSome<T>(input: Option<T>, msg: string): T
[src]

§Type Parameters

§Parameters

§
input: Option<T>
[src]
§
msg: string
[src]

§Return Type