Determines if an element is a Promise-like object.
Function used to check if an element is a PromiseLike<U> object by validating that it is an object that contains a thenable function.
isPromiseLike(1) // falseisPromiseLike(Promise.resolve(1)) // trueisPromiseLike({ then: () => {} }) // trueisPromiseLike({ then: 1 }) // false
true if element is a PromiseLike<U> object
Optional
element of type U or PromiseLike<U> to validate as a PromiseLike
Generated using TypeDoc v0.23.24
Determines if an element is a Promise-like object.
Remarks
Function used to check if an element is a PromiseLike<U> object by validating that it is an object that contains a thenable function.
Example
Returns
true if element is a PromiseLike<U> object