You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the proposal, when decorator expression is not wrapped in parentheses, it must be an identifier or a special member expression (which can contain . member access only). Other expressions must be parenthesized. See also https://github.com/tc39/proposal-decorators#syntax
Currently we just parse it as a plain LHS expression, so invalid syntaxes like @d['a'], @d?.a, @function(){ } class X {} are accepted.
AST to JS formatter doesn't deal with this correctly either, must be adjusted too.
The text was updated successfully, but these errors were encountered:
According to the proposal, when decorator expression is not wrapped in parentheses, it must be an identifier or a special member expression (which can contain
.
member access only). Other expressions must be parenthesized. See also https://github.com/tc39/proposal-decorators#syntaxCurrently we just parse it as a plain LHS expression, so invalid syntaxes like
@d['a']
,@d?.a
,@function(){ } class X {}
are accepted.AST to JS formatter doesn't deal with this correctly either, must be adjusted too.
The text was updated successfully, but these errors were encountered: