Skip to content

Decorate anonymous function variable assignment #4

Description

@iddan

Similar to the rule applied in https://www.ecma-international.org/ecma-262/#sec-isanonymousfunctiondefinition variable assigned to function expressions could be decorated.

This is important for readability especially when multiple decorators are applied and it is an easier solution for declaring decorated functions.

instead of:

const f = @g () => 0

It will be possible to write:

@g
const f = () => 0

And it will be transpiled to:

const f = g(function f() { return 0; });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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