-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
TypeScript: "comment not printed" between MethodDefinition and its semicolon #9324
Copy link
Copy link
Closed
Copy link
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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
Same thing happens with TSAbstractMethodDefinition.
Prettier 2.1.2
Playground link
--parser typescriptInput:
class foo1 {
bar() /* bat */;
}Output:
Error: Comment "bat" was not printed. Please report this error!
at https://prettier.io/lib/standalone.js:15:106002
at Array.forEach (<anonymous>)
at Object.ensureAllCommentsPrinted (https://prettier.io/lib/standalone.js:15:105970)
at Xi (https://prettier.io/lib/standalone.js:15:111682)
at Yi (https://prettier.io/lib/standalone.js:15:113795)
at formatWithCursor (https://prettier.io/lib/standalone.js:15:113915)
at https://prettier.io/lib/standalone.js:15:386874
at Object.format (https://prettier.io/lib/standalone.js:15:386957)
at formatCode (https://prettier.io/worker.js:115:21)
at handleMessage (https://prettier.io/worker.js:66:18)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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.