You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The guard should use PromiseLike<T>, not Promise<T>.
If a thenable can be considered a Promise/A+ promise ("if it looks like a duck, it is a duck"), it certainly does not means it's also a ES Promise (which also has catch and finally).
Therefore the PromiseLike in TypeScript.
The text was updated successfully, but these errors were encountered:
rkatic
added a commit
to rkatic/is-promise
that referenced
this issue
Apr 27, 2020
The guard should use
PromiseLike<T>
, notPromise<T>
.If a thenable can be considered a Promise/A+ promise ("if it looks like a duck, it is a duck"), it certainly does not means it's also a ES Promise (which also has
catch
andfinally
).Therefore the
PromiseLike
in TypeScript.The text was updated successfully, but these errors were encountered: