Verify the given value passes the guard. If not, throw an exception.
Optional
const a = isOrCrash(isNumber)(4 as unknown); // a is of type number, doesn't throwconst b: number = a; // ok Copy
const a = isOrCrash(isNumber)(4 as unknown); // a is of type number, doesn't throwconst b: number = a; // ok
Generated using TypeDoc
Verify the given value passes the guard. If not, throw an exception.