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