Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Passing arguments to the function #9

@jridgewell

Description

@jridgewell

When linting for the old pattern in the AMP codebase, I'm frequently finding that the call expressions take parameters:

return Promise.resolve(fn(arg))

To requires a lot of either binding, or wrapping the function in an arrow closure. Would it be more performant for implementations to take these parameters in the call to Promise.try?

// variadic args after the fn
return Promise.try(fn, arg);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions