@@ -6,12 +6,12 @@ namespace Example1 {
6
6
>Example1 : typeof Example1
7
7
8
8
type S = { done: boolean, value: number };
9
- >S : S
9
+ >S : { done: boolean; value: number; }
10
10
>done : boolean
11
11
>value : number
12
12
13
13
type T =
14
- >T : T
14
+ >T : { done: true; value: number; } | { done: false; value: number; }
15
15
16
16
| { done: true, value: number } // T0
17
17
>done : true
@@ -42,12 +42,12 @@ namespace Example2 {
42
42
>Example2 : typeof Example2
43
43
44
44
type S = { a: 0 | 2, b: 4 };
45
- >S : S
45
+ >S : { a: 0 | 2; b: 4; }
46
46
>a : 0 | 2
47
47
>b : 4
48
48
49
49
type T = { a: 0, b: 1 | 4 } // T0
50
- >T : T
50
+ >T : { a: 0; b: 1 | 4; } | { a: 1; b: 2; } | { a: 2; b: 3 | 4; }
51
51
>a : 0
52
52
>b : 4 | 1
53
53
@@ -78,12 +78,12 @@ namespace Example3 {
78
78
>Example3 : typeof Example3
79
79
80
80
type S = { a: 0 | 2, b: 4 };
81
- >S : S
81
+ >S : { a: 0 | 2; b: 4; }
82
82
>a : 0 | 2
83
83
>b : 4
84
84
85
85
type T = { a: 0, b: 1 | 4 } // T0
86
- >T : T
86
+ >T : { a: 0; b: 1 | 4; } | { a: 1; b: 2 | 4; } | { a: 2; b: 3; }
87
87
>a : 0
88
88
>b : 4 | 1
89
89
@@ -115,12 +115,12 @@ namespace Example4 {
115
115
>Example4 : typeof Example4
116
116
117
117
type S = { a: 0 | 2, b: 4 };
118
- >S : S
118
+ >S : { a: 0 | 2; b: 4; }
119
119
>a : 0 | 2
120
120
>b : 4
121
121
122
122
type T = { a: 0, b: 1 | 4 } // T0
123
- >T : T
123
+ >T : { a: 0; b: 1 | 4; } | { a: 1; b: 2; } | { a: 2; b: 3 | 4; c: string; }
124
124
>a : 0
125
125
>b : 4 | 1
126
126
@@ -155,16 +155,16 @@ namespace Example5 {
155
155
// 3 discriminant properties with 3 types a piece
156
156
// is 27 possible combinations.
157
157
type N = 0 | 1 | 2;
158
- >N : N
158
+ >N : 0 | 2 | 1
159
159
160
160
type S = { a: N, b: N, c: N };
161
- >S : S
161
+ >S : { a: N; b: N; c: N; }
162
162
>a : N
163
163
>b : N
164
164
>c : N
165
165
166
166
type T = { a: 0, b: N, c: N }
167
- >T : T
167
+ >T : { a: 0; b: N; c: N; } | { a: 1; b: N; c: N; } | { a: 2; b: N; c: N; } | { a: N; b: 0; c: N; } | { a: N; b: 1; c: N; } | { a: N; b: 2; c: N; } | { a: N; b: N; c: 0; } | { a: N; b: N; c: 1; } | { a: N; b: N; c: 2; }
168
168
>a : 0
169
169
>b : N
170
170
>c : N
@@ -228,7 +228,7 @@ namespace GH14865 {
228
228
>GH14865 : typeof GH14865
229
229
230
230
type Style1 = {
231
- >Style1 : Style1
231
+ >Style1 : { type: "A"; data: string; } | { type: "B"; data: string; }
232
232
233
233
type: "A";
234
234
>type : "A"
@@ -246,7 +246,7 @@ namespace GH14865 {
246
246
};
247
247
248
248
type Style2 = {
249
- >Style2 : Style2
249
+ >Style2 : { type: "A" | "B"; data: string; }
250
250
251
251
type: "A" | "B";
252
252
>type : "A" | "B"
@@ -322,10 +322,10 @@ namespace GH12052 {
322
322
>type : "categorical"
323
323
324
324
type IAxis = ILinearAxis | ICategoricalAxis;
325
- >IAxis : IAxis
325
+ >IAxis : ILinearAxis | ICategoricalAxis
326
326
327
327
type IAxisType = "linear" | "categorical";
328
- >IAxisType : IAxisType
328
+ >IAxisType : "linear" | "categorical"
329
329
330
330
function getAxisType(): IAxisType {
331
331
>getAxisType : () => IAxisType
@@ -381,10 +381,10 @@ namespace GH18421 {
381
381
}
382
382
383
383
type ThingType = 'one' | 'two';
384
- >ThingType : ThingType
384
+ >ThingType : "one" | "two"
385
385
386
386
type Thing = ThingTypeOne | ThingTypeTwo;
387
- >Thing : Thing
387
+ >Thing : ThingTypeOne | ThingTypeTwo
388
388
389
389
function makeNewThing(thingType: ThingType): Thing {
390
390
>makeNewThing : (thingType: ThingType) => Thing
@@ -406,7 +406,7 @@ namespace GH15907 {
406
406
>GH15907 : typeof GH15907
407
407
408
408
type Action = { type: 'activate' } | { type: 'disactivate' };
409
- >Action : Action
409
+ >Action : { type: 'activate'; } | { type: 'disactivate'; }
410
410
>type : "activate"
411
411
>type : "disactivate"
412
412
@@ -445,7 +445,7 @@ namespace GH20889 {
445
445
>type : "A2"
446
446
}
447
447
type AU = A1 | A2;
448
- >AU : AU
448
+ >AU : A1 | A2
449
449
450
450
function foo(obj1: AU) {
451
451
>foo : (obj1: AU) => void
@@ -470,10 +470,10 @@ namespace GH39357 {
470
470
>GH39357 : typeof GH39357
471
471
472
472
type A = ["a", number] | ["b", number] | ["c", string];
473
- >A : A
473
+ >A : ["a", number] | ["b", number] | ["c", string]
474
474
475
475
type B = "a" | "b" | "c";
476
- >B : B
476
+ >B : "a" | "b" | "c"
477
477
478
478
declare const b: B;
479
479
>b : B
0 commit comments