Prettier 2.8.5
Playground link
Input:
class A {
@dec() accessor #field;
}
Output:
SyntaxError: Decorators are not valid here. (2:3)
1 | class A {
> 2 | @dec() accessor #field;
| ^^^^^^
3 | }
Expected behavior:
No SyntaxError. Change the parser from "typescript" to "babel-ts" will make it work.
Prettier 2.8.4 works fine, seems 2.8.5 introduced this.
Prettier 2.8.5
Playground link
Input:
Output:
Expected behavior:
No SyntaxError. Change the parser from "typescript" to "babel-ts" will make it work.
Prettier 2.8.4 works fine, seems 2.8.5 introduced this.