Decorators: implement both optional parens and normal expressions. #7773
Labels
i: discussion
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Spec: Decorators
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
, orautomaticParens
) 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
The text was updated successfully, but these errors were encountered: