Skip to content

Commit 38d1f7f

Browse files
committed
Add tests
1 parent cfe7284 commit 38d1f7f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)