expectOkReturn 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§T[src]§E[src]§Parameters§input: Result<T, E>[src]§msg: string[src]§Return Type§T[src]