isThenable
isThenable<
T>(value):value is PromiseLike<T>
Defined in: packages/core/src/guards/is-thenable.ts:11
Check if a value is thenable, and so can be awaited as a promise.
Structural rather than instanceof Promise: a value from another realm, a
userland promise implementation, or a plain function returning
Promise.resolve() are all awaitable and none of them are Promise.
Type Parameters
Section titled “Type Parameters”T = unknown
Parameters
Section titled “Parameters”unknown
The value to check
Returns
Section titled “Returns”value is PromiseLike<T>
True if the value has a callable then