Commits
Click on a commit to change the comparison rangefix(formatter): relocate leading comments for single-element union/intersection types
For type alias declarations like `type A = /*1*/ | C`, Prettier relocates
the leading comment from before the `|`/`&` operator to after the identifier,
producing `type A /*1*/ = C;` instead of `type A = /*1*/ C;`.
This fix handles the comment relocation for single-element union and
intersection types, but skips complex nested cases (parenthesized types
or same-type nesting) which have different comment handling rules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>