Skip to content

Commit e45c5db

Browse files
committed
Add tests and accept new baselines
1 parent 443abe5 commit e45c5db

8 files changed

+76
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [intersectionTypeWithLeadingOperator.ts]
2+
type A = & string;
3+
type B =
4+
& { foo: string }
5+
& { bar: number };
6+
7+
8+
//// [intersectionTypeWithLeadingOperator.js]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/compiler/intersectionTypeWithLeadingOperator.ts ===
2+
type A = & string;
3+
>A : Symbol(A, Decl(intersectionTypeWithLeadingOperator.ts, 0, 0))
4+
5+
type B =
6+
>B : Symbol(B, Decl(intersectionTypeWithLeadingOperator.ts, 0, 18))
7+
8+
& { foo: string }
9+
>foo : Symbol(foo, Decl(intersectionTypeWithLeadingOperator.ts, 2, 5))
10+
11+
& { bar: number };
12+
>bar : Symbol(bar, Decl(intersectionTypeWithLeadingOperator.ts, 3, 5))
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/compiler/intersectionTypeWithLeadingOperator.ts ===
2+
type A = & string;
3+
>A : string
4+
5+
type B =
6+
>B : B
7+
8+
& { foo: string }
9+
>foo : string
10+
11+
& { bar: number };
12+
>bar : number
13+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// [unionTypeWithLeadingOperator.ts]
2+
type A = | string;
3+
type B =
4+
| { type: "INCREMENT" }
5+
| { type: "DECREMENT" };
6+
7+
8+
//// [unionTypeWithLeadingOperator.js]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/compiler/unionTypeWithLeadingOperator.ts ===
2+
type A = | string;
3+
>A : Symbol(A, Decl(unionTypeWithLeadingOperator.ts, 0, 0))
4+
5+
type B =
6+
>B : Symbol(B, Decl(unionTypeWithLeadingOperator.ts, 0, 18))
7+
8+
| { type: "INCREMENT" }
9+
>type : Symbol(type, Decl(unionTypeWithLeadingOperator.ts, 2, 5))
10+
11+
| { type: "DECREMENT" };
12+
>type : Symbol(type, Decl(unionTypeWithLeadingOperator.ts, 3, 5))
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=== tests/cases/compiler/unionTypeWithLeadingOperator.ts ===
2+
type A = | string;
3+
>A : string
4+
5+
type B =
6+
>B : B
7+
8+
| { type: "INCREMENT" }
9+
>type : "INCREMENT"
10+
11+
| { type: "DECREMENT" };
12+
>type : "DECREMENT"
13+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type A = & string;
2+
type B =
3+
& { foo: string }
4+
& { bar: number };
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type A = | string;
2+
type B =
3+
| { type: "INCREMENT" }
4+
| { type: "DECREMENT" };

0 commit comments

Comments
 (0)