Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace instanceof Promise and support Promise/A+ #310

Merged
merged 9 commits into from Jul 25, 2019

Conversation

andrewwa-kainos
Copy link
Contributor

This fixes a problem found wherein "Promise" instances from ES5 were not recognised as "instanceof Promise" from ES2015.

@timja
Copy link

timja commented Jan 28, 2019

@NoNameProvided Would you be able to take a look at this please when you have time? Thanks

@vlapo
Copy link
Contributor

vlapo commented Jul 21, 2019

I am ok with support Promise/A+ compliant thenable but why we need another dependency because of one function? Could you please create e.g. new utils.ts file with isPromise function?

@andrewwa-kainos
Copy link
Contributor Author

@vlapo Done

Copy link
Contributor

@vlapo vlapo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewwa-kainos Thnx for your effort. Could you please check my in-code comment?

Note: We have also new ValidatePromise (merged it few moments ago). Could you rebase and also use your isPromise method in this validator?

src/utils.ts Outdated Show resolved Hide resolved
@vlapo
Copy link
Contributor

vlapo commented Jul 25, 2019

Thank you for your contribution :)

@vlapo vlapo changed the title Use isPromise instead of instanceof Promise feat: replace instanceof Promise and support Promise/A+ Jul 25, 2019
@vlapo vlapo merged commit 59eac09 into typestack:master Jul 25, 2019
@vlapo vlapo added this to the v0.10.0 milestone Jul 26, 2019
@github-actions
Copy link

github-actions bot commented Aug 4, 2020

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants