652 B
652 B
Home > @apextoaster/js-utils > mustExist
mustExist() function
Assert that a variable is not None
and return the value. Throw if it is None
.
Signature:
export declare function mustExist<T>(val: Maybe<T>, err?: string): T;
Parameters
Parameter | Type | Description |
---|---|---|
val | Maybe<T> | |
err | string |
Returns:
T
val
Exceptions
NotFoundError