isPromise<U>(element?: U | Promise<U>): element is Promise<U>
Determines if an element is a Promise object.
Remarks
Function used to check if an element is a Promise<U> object
by validating that it is an object that contains a thenable
function and is an instance of Promise.
Determines if an element is a Promise object.
Remarks
Function used to check if an element is a Promise<U> object by validating that it is an object that contains a thenable function and is an instance of Promise.
Example
Returns
true if element is a Promise<U> object