Page Contents
Home > @loopback/context > isPromiseLike
isPromiseLike() function
Check whether a value is a Promise-like instance. Recognizes both native promises and third-party promise libraries.
Signature:
export declare function isPromiseLike<T>(value: T | PromiseLike<T> | undefined): value is PromiseLike<T>;
Parameters
Parameter | Type | Description |
---|---|---|
value | T | PromiseLike<T> | undefined | The value to check. |
Returns:
value is PromiseLike<T>