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

Type II support for promise then is essential for hooking into existing promises' lifecycles and observing them without a massive amount of complexity. #21

Open
dead-claudia opened this issue Jan 31, 2021 · 4 comments

Comments

@dead-claudia
Copy link

Mithril actively relies on it to observe when a promise chain stops, and removing this may break sites using it. (Some of the adjustments in there are because of an async/await change that spawned a bug report against us with multiple people complaining.)

This one is also isolated enough and simple enough to work around that I see value in it having a one-off exception, and I can't think of any other methods with such concerns.

@bakkot
Copy link

bakkot commented Jan 31, 2021

(Permalink for posterity.)

@bakkot
Copy link

bakkot commented Jan 31, 2021

Is this actually Type III? It doesn't look to me like it's overriding Symbol.species.

(Actually, it also looks to me like it's explicitly overwriting .then so that it wraps the result itself, rather than relying on the built-in .then to do it. But I'm less sure of that.)

@dead-claudia
Copy link
Author

@bakkot It's overriding .then, not @@species. Probably should've specified it's more type II, not type III in hindsight, as that's more accurate. I'll change the title appropriately.

@dead-claudia dead-claudia changed the title Type III support for promise then is essential for hooking into existing promises' lifecycles and observing them without a massive amount of complexity. Type II support for promise then is essential for hooking into existing promises' lifecycles and observing them without a massive amount of complexity. Feb 14, 2021
@codehag
Copy link
Collaborator

codehag commented May 31, 2021

Type II is unlikely to be removed, we just have it there for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants