Closed maraisr closed 7 years ago
Hi @maraisr:
I've tried out this code snippet on Prettier's REPL, and (apart from the lack of support for the private
keyword), I'm not seeing Prettier adding any parentheses. TypeScript also doesn't seem to have a problem with it.
The 'ngInject';
string used in your example is called a Prologue Directive, and is a part of the ECMAScript language specification. Wrapping parentheses around the string fundamentally changes its meaning to the parser, which is why we're not picking it up.
I'm going to close this issue because whatever variant of Prettier that you're using is going to need to be fixed to properly support prologue directives.
Hi, so prettier adds a wrapping bracket to the string
('ngInject')
. Which isn't compiling correctly.TypeScript -> es2017 -> Babel -> es5.
Can you please direct me to the line / file I'll need to edit to make this mod. Could be a root
ng-annotate
issue?