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: improve Promise-compliance #8
feat: improve Promise-compliance #8
Conversation
9ac8e2d
to
925744b
Compare
This is truly impressive! Thank you so much for working on this. I like the subclass implementation since we can rely on the native Promise that way. It'd be great if we could reuse/change the |
I rewrote it a bit to use a deferred executor. The tests are passing, I think it works as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic! Thank you, @jonaskuske!
Is there any way I can buy you a coffee?
FYI, got both the subclassed version and the standalone one (doesn't rely on
Promise
at all) to work!Both pass your tests and the A+ test suite and I managed to get the types working, too :)
You can switch between the implementations by adjusting the commented exports at the bottom in
DeferredPromise.ts
, and run the tests withnpm test && npm run test-aplus
.Give them a try and feel free to use them or to borrow stuff for your impl :)