js-util

Home > rc-js-util > promiseRejectFalse

promiseRejectFalse() function

Returns a Promise of rejection with the supplied error if the value is false.

Signature:

export declare function promiseRejectFalse(value: Promise<boolean> | boolean, error: unknown): Promise<void>;

Parameters

Parameter Type Description
value Promise<boolean> | boolean  
error unknown  

Returns:

Promise<void>

Remarks

See promiseRejectFalse().