Home > rc-js-util > promiseRejectNull
Returns a Promise of rejection with the supplied error if the value is null
or undefined
.
Signature:
export declare function promiseRejectNull<T>(value: Promise<T> | T, error: unknown): Promise<Exclude<T, null | undefined>>;
Parameter | Type | Description |
---|---|---|
value | Promise<T> | T | |
error | unknown |
Returns:
Promise<Exclude<T, null | undefined>>
See promiseRejectNull().