We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74e892b commit 354b95eCopy full SHA for 354b95e
1 file changed
changelog_unreleased/flow/17196.md
@@ -0,0 +1,16 @@
1
+#### Fix missing parentheses in `ConditionalTypeAnnotation` (#17196 by @fisker)
2
+
3
+<!-- prettier-ignore -->
4
+```jsx
5
+// Input
6
+type T<U> = 'a' | ('b' extends U ? 'c' : empty);
7
+type T<U> = 'a' & ('b' extends U ? 'c' : empty);
8
9
+// Prettier stable
10
+type T<U> = "a" | "b" extends U ? "c" : empty;
11
+type T<U> = "a" & "b" extends U ? "c" : empty;
12
13
+// Prettier main
14
+type T<U> = "a" | ("b" extends U ? "c" : empty);
15
+type T<U> = "a" & ("b" extends U ? "c" : empty);
16
+```
0 commit comments