Returns true for native Promise instances and for values that expose a callable
.then method. This is useful when you do not care whether the value is literally
a Promise instance and only need awaitable behavior.
Parameters
x: unknown
Returns xisPromiseLike<unknown>
Remarks
This function does not care if there is a .catch method or not.
Only presence of .then is sufficient to be considered Promise-like.
Checks if a value is Promise-like (thenable).
Returns true for native Promise instances and for values that expose a callable
.thenmethod. This is useful when you do not care whether the value is literally a Promise instance and only need awaitable behavior.