Add tests and accept new baselines
This commit is contained in:
parent
443abe5373
commit
e45c5dbcea
8 changed files with 76 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
//// [intersectionTypeWithLeadingOperator.ts]
|
||||
type A = & string;
|
||||
type B =
|
||||
& { foo: string }
|
||||
& { bar: number };
|
||||
|
||||
|
||||
//// [intersectionTypeWithLeadingOperator.js]
|
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/compiler/intersectionTypeWithLeadingOperator.ts ===
|
||||
type A = & string;
|
||||
>A : Symbol(A, Decl(intersectionTypeWithLeadingOperator.ts, 0, 0))
|
||||
|
||||
type B =
|
||||
>B : Symbol(B, Decl(intersectionTypeWithLeadingOperator.ts, 0, 18))
|
||||
|
||||
& { foo: string }
|
||||
>foo : Symbol(foo, Decl(intersectionTypeWithLeadingOperator.ts, 2, 5))
|
||||
|
||||
& { bar: number };
|
||||
>bar : Symbol(bar, Decl(intersectionTypeWithLeadingOperator.ts, 3, 5))
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/compiler/intersectionTypeWithLeadingOperator.ts ===
|
||||
type A = & string;
|
||||
>A : string
|
||||
|
||||
type B =
|
||||
>B : B
|
||||
|
||||
& { foo: string }
|
||||
>foo : string
|
||||
|
||||
& { bar: number };
|
||||
>bar : number
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
//// [unionTypeWithLeadingOperator.ts]
|
||||
type A = | string;
|
||||
type B =
|
||||
| { type: "INCREMENT" }
|
||||
| { type: "DECREMENT" };
|
||||
|
||||
|
||||
//// [unionTypeWithLeadingOperator.js]
|
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/compiler/unionTypeWithLeadingOperator.ts ===
|
||||
type A = | string;
|
||||
>A : Symbol(A, Decl(unionTypeWithLeadingOperator.ts, 0, 0))
|
||||
|
||||
type B =
|
||||
>B : Symbol(B, Decl(unionTypeWithLeadingOperator.ts, 0, 18))
|
||||
|
||||
| { type: "INCREMENT" }
|
||||
>type : Symbol(type, Decl(unionTypeWithLeadingOperator.ts, 2, 5))
|
||||
|
||||
| { type: "DECREMENT" };
|
||||
>type : Symbol(type, Decl(unionTypeWithLeadingOperator.ts, 3, 5))
|
||||
|
13
tests/baselines/reference/unionTypeWithLeadingOperator.types
Normal file
13
tests/baselines/reference/unionTypeWithLeadingOperator.types
Normal file
|
@ -0,0 +1,13 @@
|
|||
=== tests/cases/compiler/unionTypeWithLeadingOperator.ts ===
|
||||
type A = | string;
|
||||
>A : string
|
||||
|
||||
type B =
|
||||
>B : B
|
||||
|
||||
| { type: "INCREMENT" }
|
||||
>type : "INCREMENT"
|
||||
|
||||
| { type: "DECREMENT" };
|
||||
>type : "DECREMENT"
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
type A = & string;
|
||||
type B =
|
||||
& { foo: string }
|
||||
& { bar: number };
|
4
tests/cases/compiler/unionTypeWithLeadingOperator.ts
Normal file
4
tests/cases/compiler/unionTypeWithLeadingOperator.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
type A = | string;
|
||||
type B =
|
||||
| { type: "INCREMENT" }
|
||||
| { type: "DECREMENT" };
|
Loading…
Reference in a new issue