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

Decorators: implement both optional parens and normal expressions. #7773

Closed
nicolo-ribaudo opened this issue Apr 21, 2018 · 1 comment · Fixed by #7976
Closed

Decorators: implement both optional parens and normal expressions. #7773

nicolo-ribaudo opened this issue Apr 21, 2018 · 1 comment · Fixed by #7976
Labels
i: discussion outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Spec: Decorators

Comments

@nicolo-ribaudo
Copy link
Member

The main thing preventing me from finishing the work on decorators is that it is not clear yet wether they will have optional parentheses or not.

Currently the proposal specifies @deco and @deco() to have the same meaning, but there is strong opposition from different people (tc39/proposal-decorators#81).

I propose adding an option to the new implementation of @babel/plugin-proposal-decorators (e.g. optionalParens, or automaticParens) which toggles this behavior. This would have two advantages: it would allow us to ship decorators in Babel 7 and it would make it easier to collect feedback about which of the two behaviors is better.

cc @littledan

@littledan
Copy link

I really like the idea of implementing both options and letting people try out both. I was hoping to definitively answer this question by the May 2018 TC39 meeting; if such a flag can be available a little ahead of that (even in a branch) it could be really helpful in reaching that goal.

Note that this is not the only remaining big specification question; see others at https://github.com/tc39/proposal-decorators/labels/stage%203%20blocker

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: discussion outdated A closed issue/PR that is archived due to age. Recommended to make a new issue Spec: Decorators
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants