-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Removing parentheses for decorators causes TS1497 error. #16429
Copy link
Copy link
Closed
ember-animation/ember-animated
#703Labels
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.status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
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.status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
TypeScript announces Stricter Parsing for Decorators in v5.5. Prettier removes parentheses for decorators after commit #11849. This breaks the code and tsc throws "TS1497: Expression must be enclosed in parentheses to be used as a decorator".
Prettier 3.3.2
Playground link
Input:
Output:
Expected behavior:
Input:
Output: