Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove hacks for single-element unions/intersections (#10457)
* Remove hacks for degenerate unions/intersection * Add changelog
- Loading branch information
Showing
8 changed files
with
67 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#### Fix misplaced comments in unions and intersections (#10457 by @thorn0) | ||
|
||
<!-- prettier-ignore --> | ||
```ts | ||
// Input | ||
type Foo = "1" | "2" /* two */ | "3"; | ||
|
||
// Prettier stable | ||
type Foo = "1" | "2" | /* two */ "3"; | ||
|
||
// Prettier main | ||
type Foo = "1" | "2" /* two */ | "3"; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type A1 = a /* 1 */ | b; | ||
type A2 = a | /* 1 */ b; | ||
type A3 = (a /* 1 */) | b; | ||
type A4 = a | (/* 1 */ b); | ||
type A5 = (a) /* 1 */ | b; | ||
type A6 = a | /* 1 */ (b); | ||
|
||
type B1 = a /* 1 */ /* 2 */ | b; | ||
type B2 = a /* 1 */ | /* 2 */ b; | ||
type B3 = a | /* 1 */ /* 2 */ b; |