isPromise
isPromise(
value):value is Promise<unknown>
Defined in: packages/core/src/guards/is-promise.ts:15
Check if a value is a Promise.
This is a brand check, unlike isThenable, which answers the broader
structural question and accepts any object carrying a callable then. Use
this one to identify a genuine Promise, and isThenable to decide whether
a value can be awaited.
Realm-bound: a Promise built in another realm (worker, iframe, vm context)
is not recognised.
Parameters
Section titled “Parameters”unknown
The value to check
Returns
Section titled “Returns”value is Promise<unknown>
True if the value is a Promise