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

Feature: use ES6 proxy to support all methods on promised objects #1699

Open
Tantalon opened this issue Dec 21, 2022 · 1 comment
Open

Feature: use ES6 proxy to support all methods on promised objects #1699

Tantalon opened this issue Dec 21, 2022 · 1 comment

Comments

@Tantalon
Copy link

If we could chain async method calls on promised objects, we could eliminate intermediate awaits and just have a single await on the result:
await Promise.resolve('hello').toUpperCase().replace(/$/, ', world!')

My proposal is to use ES6 Proxy so that any unknown method call is a promise to perform it on the promised object.

@benjamingr
Copy link
Collaborator

Development on bluebird has virtually stopped. We will still fix security issues but Petka is pretty much gone from here and social (for now) and releases are tricky (I would have to go through npm contacts or Petka's wife which I met).

Your suggestion can be a library though?

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

2 participants