Skip to content

Commit e80b47d

Browse files
committed
Accept new baselines
1 parent 38d1f7f commit e80b47d

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// [intersectionReduction.ts]
2+
// @strict
3+
4+
declare const sym1: unique symbol;
5+
declare const sym2: unique symbol;
6+
7+
type T1 = string & 'a'; // 'a'
8+
type T2 = 'a' & string & 'b'; // 'a' & 'b'
9+
type T3 = number & 10; // 10
10+
type T4 = 10 & number & 20; // 10 & 20
11+
type T5 = symbol & typeof sym1; // typeof sym1
12+
type T6 = typeof sym1 & symbol & typeof sym2; // typeof sym1 & typeof sym2
13+
type T7 = string & 'a' & number & 10 & symbol & typeof sym1; // 'a' & 10 & typeof sym1
14+
15+
type T10 = string & ('a' | 'b'); // 'a' | 'b'
16+
type T11 = (string | number) & ('a' | 10); // 'a' | 10
17+
18+
19+
//// [intersectionReduction.js]
20+
// @strict
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
=== tests/cases/conformance/types/intersection/intersectionReduction.ts ===
2+
// @strict
3+
4+
declare const sym1: unique symbol;
5+
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))
6+
7+
declare const sym2: unique symbol;
8+
>sym2 : Symbol(sym2, Decl(intersectionReduction.ts, 3, 13))
9+
10+
type T1 = string & 'a'; // 'a'
11+
>T1 : Symbol(T1, Decl(intersectionReduction.ts, 3, 34))
12+
13+
type T2 = 'a' & string & 'b'; // 'a' & 'b'
14+
>T2 : Symbol(T2, Decl(intersectionReduction.ts, 5, 23))
15+
16+
type T3 = number & 10; // 10
17+
>T3 : Symbol(T3, Decl(intersectionReduction.ts, 6, 29))
18+
19+
type T4 = 10 & number & 20; // 10 & 20
20+
>T4 : Symbol(T4, Decl(intersectionReduction.ts, 7, 22))
21+
22+
type T5 = symbol & typeof sym1; // typeof sym1
23+
>T5 : Symbol(T5, Decl(intersectionReduction.ts, 8, 27))
24+
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))
25+
26+
type T6 = typeof sym1 & symbol & typeof sym2; // typeof sym1 & typeof sym2
27+
>T6 : Symbol(T6, Decl(intersectionReduction.ts, 9, 31))
28+
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))
29+
>sym2 : Symbol(sym2, Decl(intersectionReduction.ts, 3, 13))
30+
31+
type T7 = string & 'a' & number & 10 & symbol & typeof sym1; // 'a' & 10 & typeof sym1
32+
>T7 : Symbol(T7, Decl(intersectionReduction.ts, 10, 45))
33+
>sym1 : Symbol(sym1, Decl(intersectionReduction.ts, 2, 13))
34+
35+
type T10 = string & ('a' | 'b'); // 'a' | 'b'
36+
>T10 : Symbol(T10, Decl(intersectionReduction.ts, 11, 60))
37+
38+
type T11 = (string | number) & ('a' | 10); // 'a' | 10
39+
>T11 : Symbol(T11, Decl(intersectionReduction.ts, 13, 32))
40+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
=== tests/cases/conformance/types/intersection/intersectionReduction.ts ===
2+
// @strict
3+
4+
declare const sym1: unique symbol;
5+
>sym1 : unique symbol
6+
7+
declare const sym2: unique symbol;
8+
>sym2 : unique symbol
9+
10+
type T1 = string & 'a'; // 'a'
11+
>T1 : "a"
12+
13+
type T2 = 'a' & string & 'b'; // 'a' & 'b'
14+
>T2 : T2
15+
16+
type T3 = number & 10; // 10
17+
>T3 : 10
18+
19+
type T4 = 10 & number & 20; // 10 & 20
20+
>T4 : T4
21+
22+
type T5 = symbol & typeof sym1; // typeof sym1
23+
>T5 : unique symbol
24+
>sym1 : unique symbol
25+
26+
type T6 = typeof sym1 & symbol & typeof sym2; // typeof sym1 & typeof sym2
27+
>T6 : T6
28+
>sym1 : unique symbol
29+
>sym2 : unique symbol
30+
31+
type T7 = string & 'a' & number & 10 & symbol & typeof sym1; // 'a' & 10 & typeof sym1
32+
>T7 : T7
33+
>sym1 : unique symbol
34+
35+
type T10 = string & ('a' | 'b'); // 'a' | 'b'
36+
>T10 : "a" | "b"
37+
38+
type T11 = (string | number) & ('a' | 10); // 'a' | 10
39+
>T11 : "a" | 10
40+

0 commit comments

Comments
 (0)