-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
jsdoc comment in union type isn't being aligned #18787
Copy link
Copy link
Labels
area:union typeslang: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 babel-tsInput:
This is a prettier test case at
prettier/tests/format/typescript/union/comments/18389.ts
Lines 1 to 5 in 812a4d0
| type A1 = | /** | |
| * octahedralRhinocerosTransformer | |
| */ | |
| a | |
| | (b | c); |
type A1 = | /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);Output:
type A1 =
| /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);Expected output:
type A1 =
| /**
* octahedralRhinocerosTransformer
*/
a
| (b | c);Why?
Both the JSDoc comment and a should align with the other union type.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:union typeslang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)