Skip to content

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

@Tantalon

Description

@Tantalon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions