isPromise(val): val is Promise<unknown>
val
val is Promise<unknown>
Checks if a value is a Promise.
unknown
The value to check.
Returns true if the value is a Promise, else false.
true
false