throwAsync()function

throwAsync(value: PromiseLike<T> | T): T
ParamType
valuePromiseLike<T>
T
The value to unwrap. required
Return
T
Synchronous (not promised) value.
Throws
unknown
Promise if value is an asynchronous (promised) value.

Throw the value if it's an async (promised) value.

Examples

throwAsync(123) // 123