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 cfe7284 commit 38d1f7fCopy full SHA for 38d1f7f
tests/cases/conformance/types/intersection/intersectionReduction.ts
@@ -0,0 +1,15 @@
1
+// @strict
2
+
3
+declare const sym1: unique symbol;
4
+declare const sym2: unique symbol;
5
6
+type T1 = string & 'a'; // 'a'
7
+type T2 = 'a' & string & 'b'; // 'a' & 'b'
8
+type T3 = number & 10; // 10
9
+type T4 = 10 & number & 20; // 10 & 20
10
+type T5 = symbol & typeof sym1; // typeof sym1
11
+type T6 = typeof sym1 & symbol & typeof sym2; // typeof sym1 & typeof sym2
12
+type T7 = string & 'a' & number & 10 & symbol & typeof sym1; // 'a' & 10 & typeof sym1
13
14
+type T10 = string & ('a' | 'b'); // 'a' | 'b'
15
+type T11 = (string | number) & ('a' | 10); // 'a' | 10
0 commit comments