-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 2.8.5
Playground link
--parser typescript
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.
Metadata
Metadata
Assignees
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.