Skip to main content
function isPromise
isPromise(object: unknown): object is Promise<unknown>
Deprecated

Returns true if the value is a built-in Promise.

util.types.isPromise(Promise.resolve(42));  // Returns true

Parameters

object: unknown

Return Type

object is Promise<unknown>
Back to top