Add tests and accept new baselines

This commit is contained in:
Marius Schulz 2016-11-19 22:30:33 +01:00
parent 443abe5373
commit e45c5dbcea
8 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,8 @@
//// [intersectionTypeWithLeadingOperator.ts]
type A = & string;
type B =
& { foo: string }
& { bar: number };
//// [intersectionTypeWithLeadingOperator.js]

View file

@ -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))

View file

@ -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

View file

@ -0,0 +1,8 @@
//// [unionTypeWithLeadingOperator.ts]
type A = | string;
type B =
| { type: "INCREMENT" }
| { type: "DECREMENT" };
//// [unionTypeWithLeadingOperator.js]

View file

@ -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))

View 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"

View file

@ -0,0 +1,4 @@
type A = & string;
type B =
& { foo: string }
& { bar: number };

View file

@ -0,0 +1,4 @@
type A = | string;
type B =
| { type: "INCREMENT" }
| { type: "DECREMENT" };