Skip to content

Commit de2da2c

Browse files
committed
Accept new baselines
1 parent b81c226 commit de2da2c

10 files changed

Lines changed: 58 additions & 58 deletions

tests/baselines/reference/destructuringParameterProperties5.errors.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern.
2-
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature.
3-
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature.
4-
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature.
2+
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,27): error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature.
3+
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,31): error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature.
4+
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(5,35): error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature.
55
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'.
66
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'.
77
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'.
88
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'.
99
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'.
10-
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
11-
Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
12-
Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'.
10+
tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(11,19): error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'.
11+
Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'.
12+
Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'.
1313

1414

1515
==== tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts (10 errors) ====
@@ -21,11 +21,11 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1
2121
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2222
!!! error TS1187: A parameter property may not be declared using a binding pattern.
2323
~~
24-
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x1' and no string index signature.
24+
!!! error TS2459: Type 'ObjType1' has no property 'x1' and no string index signature.
2525
~~
26-
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x2' and no string index signature.
26+
!!! error TS2459: Type 'ObjType1' has no property 'x2' and no string index signature.
2727
~~
28-
!!! error TS2459: Type '{ x: number; y: string; z: boolean; }' has no property 'x3' and no string index signature.
28+
!!! error TS2459: Type 'ObjType1' has no property 'x3' and no string index signature.
2929
var foo: any = x1 || x2 || x3 || y || z;
3030
var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z;
3131
~~
@@ -43,7 +43,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts(1
4343

4444
var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]);
4545
~~~~~~
46-
!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[{ x: number; y: string; z: boolean; }, number, string]'.
47-
!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type '{ x: number; y: string; z: boolean; }'.
48-
!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type '{ x: number; y: string; z: boolean; }'.
46+
!!! error TS2345: Argument of type '[{ x1: number; x2: string; x3: boolean; }, string, boolean]' is not assignable to parameter of type '[ObjType1, number, string]'.
47+
!!! error TS2345: Type '{ x1: number; x2: string; x3: boolean; }' is not assignable to type 'ObjType1'.
48+
!!! error TS2345: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'.
4949
var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z];

tests/baselines/reference/implicitIndexSignatures.types

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== tests/cases/compiler/implicitIndexSignatures.ts ===
22
type StringMap = { [x: string]: string };
3-
>StringMap : { [x: string]: string; }
3+
>StringMap : StringMap
44
>x : string
55

66
const empty1 = {};
@@ -24,12 +24,12 @@ let names2: { a: string, b: string };
2424
>b : string
2525

2626
let map: StringMap;
27-
>map : { [x: string]: string; }
28-
>StringMap : { [x: string]: string; }
27+
>map : StringMap
28+
>StringMap : StringMap
2929

3030
map = { x: "xxx", y: "yyy" };
3131
>map = { x: "xxx", y: "yyy" } : { x: string; y: string; }
32-
>map : { [x: string]: string; }
32+
>map : StringMap
3333
>{ x: "xxx", y: "yyy" } : { x: string; y: string; }
3434
>x : string
3535
>"xxx" : "xxx"
@@ -38,22 +38,22 @@ map = { x: "xxx", y: "yyy" };
3838

3939
map = empty1;
4040
>map = empty1 : {}
41-
>map : { [x: string]: string; }
41+
>map : StringMap
4242
>empty1 : {}
4343

4444
map = empty2;
4545
>map = empty2 : {}
46-
>map : { [x: string]: string; }
46+
>map : StringMap
4747
>empty2 : {}
4848

4949
map = names1;
5050
>map = names1 : { a: string; b: string; }
51-
>map : { [x: string]: string; }
51+
>map : StringMap
5252
>names1 : { a: string; b: string; }
5353

5454
map = names2;
5555
>map = names2 : { a: string; b: string; }
56-
>map : { [x: string]: string; }
56+
>map : StringMap
5757
>names2 : { a: string; b: string; }
5858

5959
declare function getStringIndexValue<T>(map: { [x: string]: T }): T;

tests/baselines/reference/intersectionTypeNormalization.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ var z: Z4;
189189
// Repro from #9919
190190

191191
type ToString = {
192-
>ToString : { toString(): string; }
192+
>ToString : ToString
193193

194194
toString(): string;
195195
>toString : () => string
@@ -207,18 +207,18 @@ type BoxedValue = { kind: 'int', num: number }
207207
type IntersectionFail = BoxedValue & ToString
208208
>IntersectionFail : IntersectionFail
209209
>BoxedValue : BoxedValue
210-
>ToString : { toString(): string; }
210+
>ToString : ToString
211211

212212
type IntersectionInline = { kind: 'int', num: number } & ToString
213213
>IntersectionInline : IntersectionInline
214214
>kind : "int"
215215
>num : number
216-
>ToString : { toString(): string; }
216+
>ToString : ToString
217217

218218
| { kind: 'string', str: string } & ToString
219219
>kind : "string"
220220
>str : string
221-
>ToString : { toString(): string; }
221+
>ToString : ToString
222222

223223
function getValueAsString(value: IntersectionFail): string {
224224
>getValueAsString : (value: IntersectionFail) => string
@@ -236,11 +236,11 @@ function getValueAsString(value: IntersectionFail): string {
236236
>'' + value.num : string
237237
>'' : ""
238238
>value.num : number
239-
>value : { kind: "int"; num: number; } & { toString(): string; }
239+
>value : { kind: "int"; num: number; } & ToString
240240
>num : number
241241
}
242242
return value.str;
243243
>value.str : string
244-
>value : { kind: "string"; str: string; } & { toString(): string; }
244+
>value : { kind: "string"; str: string; } & ToString
245245
>str : string
246246
}

tests/baselines/reference/keyofAndIndexedAccess.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Options {
4242
}
4343

4444
type Dictionary<T> = { [x: string]: T };
45-
>Dictionary : { [x: string]: T; }
45+
>Dictionary : Dictionary<T>
4646
>T : T
4747
>x : string
4848
>T : T
@@ -88,7 +88,7 @@ type K11 = keyof Shape[]; // number | "length" | "toString" | ...
8888

8989
type K12 = keyof Dictionary<Shape>; // string | number
9090
>K12 : string | number
91-
>Dictionary : { [x: string]: T; }
91+
>Dictionary : Dictionary<T>
9292
>Shape : Shape
9393

9494
type K13 = keyof {}; // never
@@ -128,7 +128,7 @@ type K20 = KeyOf<Shape>; // "name" | "width" | "height" | "visible"
128128
type K21 = KeyOf<Dictionary<Shape>>; // string | number
129129
>K21 : string | number
130130
>KeyOf : keyof T
131-
>Dictionary : { [x: string]: T; }
131+
>Dictionary : Dictionary<T>
132132
>Shape : Shape
133133

134134
type NAME = "name";
@@ -201,17 +201,17 @@ type Q41 = (Shape & Options)["visible"]; // true & "yes" | true & "no" | false
201201

202202
type Q50 = Dictionary<Shape>["howdy"]; // Shape
203203
>Q50 : Shape
204-
>Dictionary : { [x: string]: T; }
204+
>Dictionary : Dictionary<T>
205205
>Shape : Shape
206206

207207
type Q51 = Dictionary<Shape>[123]; // Shape
208208
>Q51 : Shape
209-
>Dictionary : { [x: string]: T; }
209+
>Dictionary : Dictionary<T>
210210
>Shape : Shape
211211

212212
type Q52 = Dictionary<Shape>[E.B]; // Shape
213213
>Q52 : Shape
214-
>Dictionary : { [x: string]: T; }
214+
>Dictionary : Dictionary<T>
215215
>Shape : Shape
216216
>E : any
217217
>B : E.B

tests/baselines/reference/noErrorTruncation.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'.
1+
tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'.
22

33

44
==== tests/cases/compiler/noErrorTruncation.ts (1 errors) ====
@@ -13,7 +13,7 @@ tests/cases/compiler/noErrorTruncation.ts(10,7): error TS2322: Type '42' is not
1313

1414
const x: SomeLongOptionA
1515
~
16-
!!! error TS2322: Type '42' is not assignable to type '{ someLongOptionA: string; } | { someLongOptionB: string; } | { someLongOptionC: string; } | { someLongOptionD: string; } | { someLongOptionE: string; } | { someLongOptionF: string; }'.
16+
!!! error TS2322: Type '42' is not assignable to type 'SomeLongOptionA | SomeLongOptionB | SomeLongOptionC | SomeLongOptionD | SomeLongOptionE | SomeLongOptionF'.
1717
| SomeLongOptionB
1818
| SomeLongOptionC
1919
| SomeLongOptionD

tests/baselines/reference/nounusedTypeParameterConstraint.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { IEventSourcedEntity } from "./bar";
88
>IEventSourcedEntity : any
99

1010
export type DomainEntityConstructor<TEntity extends IEventSourcedEntity> = { new(): TEntity; };
11-
>DomainEntityConstructor : new () => TEntity
11+
>DomainEntityConstructor : DomainEntityConstructor<TEntity>
1212
>TEntity : TEntity
1313
>IEventSourcedEntity : IEventSourcedEntity
1414
>TEntity : TEntity

tests/baselines/reference/typeAliasDeclarationEmit2.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
=== tests/cases/compiler/typeAliasDeclarationEmit2.ts ===
22

33
export type A<a> = { value: a };
4-
>A : { value: a; }
4+
>A : A<a>
55
>a : a
66
>value : a
77
>a : a

tests/baselines/reference/typeAliases.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var x9: T9;
104104
>T9 : T9
105105

106106
type T10 = { x: number };
107-
>T10 : { x: number; }
107+
>T10 : T10
108108
>x : number
109109

110110
var x10: { x: number };
@@ -113,17 +113,17 @@ var x10: { x: number };
113113

114114
var x10: T10;
115115
>x10 : { x: number; }
116-
>T10 : { x: number; }
116+
>T10 : T10
117117

118118
type T11 = { new(): boolean };
119-
>T11 : new () => boolean
119+
>T11 : T11
120120

121121
var x11: { new(): boolean };
122122
>x11 : new () => boolean
123123

124124
var x11: T11;
125125
>x11 : new () => boolean
126-
>T11 : new () => boolean
126+
>T11 : T11
127127

128128
interface I13 { x: string };
129129
>I13 : I13

tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type TreeNode = {
1111
}
1212

1313
type TreeNodeMiddleman = {
14-
>TreeNodeMiddleman : { name: string; parent: TreeNode; }
14+
>TreeNodeMiddleman : TreeNodeMiddleman
1515

1616
name: string;
1717
>name : string
@@ -22,17 +22,17 @@ type TreeNodeMiddleman = {
2222
}
2323

2424
var nodes: TreeNodeMiddleman[];
25-
>nodes : { name: string; parent: TreeNode; }[]
26-
>TreeNodeMiddleman : { name: string; parent: TreeNode; }
25+
>nodes : TreeNodeMiddleman[]
26+
>TreeNodeMiddleman : TreeNodeMiddleman
2727

2828
nodes.map(n => n.name);
2929
>nodes.map(n => n.name) : string[]
30-
>nodes.map : { <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; }
31-
>nodes : { name: string; parent: TreeNode; }[]
32-
>map : { <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U, U]; <U>(this: [{ name: string; parent: TreeNode; }, { name: string; parent: TreeNode; }], callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: { name: string; parent: TreeNode; }, index: number, array: { name: string; parent: TreeNode; }[]) => U, thisArg?: any): U[]; }
33-
>n => n.name : (n: { name: string; parent: TreeNode; }) => string
34-
>n : { name: string; parent: TreeNode; }
30+
>nodes.map : { <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; }
31+
>nodes : TreeNodeMiddleman[]
32+
>map : { <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; <U>(this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; <U>(callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; }
33+
>n => n.name : (n: TreeNodeMiddleman) => string
34+
>n : TreeNodeMiddleman
3535
>n.name : string
36-
>n : { name: string; parent: TreeNode; }
36+
>n : TreeNodeMiddleman
3737
>name : string
3838

tests/baselines/reference/typeGuardNarrowsPrimitiveIntersection.types

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
=== tests/cases/conformance/expressions/typeGuards/typeGuardNarrowsPrimitiveIntersection.ts ===
22
type Tag = {__tag: any};
3-
>Tag : { __tag: any; }
3+
>Tag : Tag
44
>__tag : any
55

66
declare function isNonBlank(value: string) : value is (string & Tag);
7-
>isNonBlank : (value: string) => value is string & { __tag: any; }
7+
>isNonBlank : (value: string) => value is string & Tag
88
>value : string
99
>value : any
10-
>Tag : { __tag: any; }
10+
>Tag : Tag
1111

1212
declare function doThis(value: string & Tag): void;
13-
>doThis : (value: string & { __tag: any; }) => void
14-
>value : string & { __tag: any; }
15-
>Tag : { __tag: any; }
13+
>doThis : (value: string & Tag) => void
14+
>value : string & Tag
15+
>Tag : Tag
1616

1717
declare function doThat(value: string) : void;
1818
>doThat : (value: string) => void
@@ -23,13 +23,13 @@ let value: string;
2323

2424
if (isNonBlank(value)) {
2525
>isNonBlank(value) : boolean
26-
>isNonBlank : (value: string) => value is string & { __tag: any; }
26+
>isNonBlank : (value: string) => value is string & Tag
2727
>value : string
2828

2929
doThis(value);
3030
>doThis(value) : void
31-
>doThis : (value: string & { __tag: any; }) => void
32-
>value : string & { __tag: any; }
31+
>doThis : (value: string & Tag) => void
32+
>value : string & Tag
3333

3434
} else {
3535
doThat(value);

0 commit comments

Comments
 (0)