-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Improve comment attach in union type #18828
Copy link
Copy link
Open
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)
Description
Prettier 3.8.1
Playground link
--parser typescriptInput:
type a = /* daily rate limit */ "messageLimitExceeded" | /* general 429 */ "rateLimitExceeded";Output:
type a = /* daily rate limit */
| "messageLimitExceeded"
| /* general 429 */ "rateLimitExceeded";Second Output:
type a =
/* daily rate limit */
"messageLimitExceeded" | /* general 429 */ "rateLimitExceeded";Expected output:
Why?
Prettier pr-18827
Playground link
--parser typescriptInput:
type A = /* daily rate limit */ "messageLimitExceeded" | /* general 429 */ "rateLimitExceeded";Output:
type A =
/* daily rate limit */ | "messageLimitExceeded"
| /* general 429 */ "rateLimitExceeded";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)