Skip to content

Commit f7f0c51

Browse files
Accepted baselines.
1 parent b8ca925 commit f7f0c51

8 files changed

+27
-31
lines changed

tests/baselines/reference/arityAndOrderCompatibility01.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(25,5): error
2121
Types of property '0' are incompatible.
2222
Type 'string' is not assignable to type 'number'.
2323
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(26,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'.
24-
Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
24+
Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
2525
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(27,5): error TS2322: Type '[string, number]' is not assignable to type '[string]'.
2626
Types of property 'length' are incompatible.
2727
Type '2' is not assignable to type '1'.
2828
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(28,5): error TS2322: Type 'StrNum' is not assignable to type '[string]'.
2929
Types of property 'length' are incompatible.
3030
Type '2' is not assignable to type '1'.
3131
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(29,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'.
32-
Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
32+
Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
3333
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(30,5): error TS2322: Type '[string, number]' is not assignable to type '[number, string]'.
3434
Type 'string' is not assignable to type 'number'.
3535
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(31,5): error TS2322: Type 'StrNum' is not assignable to type '[number, string]'.
3636
Types of property '0' are incompatible.
3737
Type 'string' is not assignable to type 'number'.
3838
tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'.
39-
Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
39+
Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
4040

4141

4242
==== tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts (19 errors) ====
@@ -102,7 +102,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error
102102
var l3: [number] = z;
103103
~~
104104
!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number]'.
105-
!!! error TS2322: Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
105+
!!! error TS2322: Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
106106
var m1: [string] = x;
107107
~~
108108
!!! error TS2322: Type '[string, number]' is not assignable to type '[string]'.
@@ -116,7 +116,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error
116116
var m3: [string] = z;
117117
~~
118118
!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[string]'.
119-
!!! error TS2322: Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
119+
!!! error TS2322: Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
120120
var n1: [number, string] = x;
121121
~~
122122
!!! error TS2322: Type '[string, number]' is not assignable to type '[number, string]'.
@@ -129,7 +129,7 @@ tests/cases/conformance/types/tuple/arityAndOrderCompatibility01.ts(32,5): error
129129
var n3: [number, string] = z;
130130
~~
131131
!!! error TS2322: Type '{ 0: string; 1: number; length: 2; }' is not assignable to type '[number, string]'.
132-
!!! error TS2322: Property 'push' is missing in type '{ 0: string; 1: number; length: 2; }'.
132+
!!! error TS2322: Property 'pop' is missing in type '{ 0: string; 1: number; length: 2; }'.
133133
var o1: [string, number] = x;
134134
var o2: [string, number] = y;
135135
var o3: [string, number] = y;

tests/baselines/reference/arrayAssignmentTest1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(77,1): error TS2322: Type 'I1[]' is
3434
Type 'I1' is not assignable to type 'C3'.
3535
Property 'CM3M1' is missing in type 'I1'.
3636
tests/cases/compiler/arrayAssignmentTest1.ts(79,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
37-
Property 'push' is missing in type '() => C1'.
37+
Property 'pop' is missing in type '() => C1'.
3838
tests/cases/compiler/arrayAssignmentTest1.ts(80,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
3939
Property 'length' is missing in type '{ one: number; }'.
4040
tests/cases/compiler/arrayAssignmentTest1.ts(82,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
@@ -177,7 +177,7 @@ tests/cases/compiler/arrayAssignmentTest1.ts(85,1): error TS2322: Type 'I1' is n
177177
arr_any = f1; // should be an error - is
178178
~~~~~~~
179179
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
180-
!!! error TS2322: Property 'push' is missing in type '() => C1'.
180+
!!! error TS2322: Property 'pop' is missing in type '() => C1'.
181181
arr_any = o1; // should be an error - is
182182
~~~~~~~
183183
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.

tests/baselines/reference/arrayAssignmentTest2.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ tests/cases/compiler/arrayAssignmentTest2.ts(49,1): error TS2322: Type 'I1[]' is
88
Type 'I1' is not assignable to type 'C3'.
99
Property 'CM3M1' is missing in type 'I1'.
1010
tests/cases/compiler/arrayAssignmentTest2.ts(51,1): error TS2322: Type '() => C1' is not assignable to type 'any[]'.
11-
Property 'push' is missing in type '() => C1'.
11+
Property 'pop' is missing in type '() => C1'.
1212
tests/cases/compiler/arrayAssignmentTest2.ts(52,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
13-
Property 'push' is missing in type '() => any'.
13+
Property 'pop' is missing in type '() => any'.
1414
tests/cases/compiler/arrayAssignmentTest2.ts(53,1): error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.
1515
Property 'length' is missing in type '{ one: number; }'.
1616
tests/cases/compiler/arrayAssignmentTest2.ts(55,1): error TS2322: Type 'C1' is not assignable to type 'any[]'.
@@ -89,11 +89,11 @@ tests/cases/compiler/arrayAssignmentTest2.ts(58,1): error TS2322: Type 'I1' is n
8989
arr_any = f1; // should be an error - is
9090
~~~~~~~
9191
!!! error TS2322: Type '() => C1' is not assignable to type 'any[]'.
92-
!!! error TS2322: Property 'push' is missing in type '() => C1'.
92+
!!! error TS2322: Property 'pop' is missing in type '() => C1'.
9393
arr_any = function () { return null;} // should be an error - is
9494
~~~~~~~
9595
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
96-
!!! error TS2322: Property 'push' is missing in type '() => any'.
96+
!!! error TS2322: Property 'pop' is missing in type '() => any'.
9797
arr_any = o1; // should be an error - is
9898
~~~~~~~
9999
!!! error TS2322: Type '{ one: number; }' is not assignable to type 'any[]'.

tests/baselines/reference/arrayAssignmentTest4.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/compiler/arrayAssignmentTest4.ts(22,1): error TS2322: Type '() => any' is not assignable to type 'any[]'.
2-
Property 'push' is missing in type '() => any'.
2+
Property 'pop' is missing in type '() => any'.
33
tests/cases/compiler/arrayAssignmentTest4.ts(23,1): error TS2322: Type 'C3' is not assignable to type 'any[]'.
44
Property 'length' is missing in type 'C3'.
55

@@ -29,7 +29,7 @@ tests/cases/compiler/arrayAssignmentTest4.ts(23,1): error TS2322: Type 'C3' is n
2929
arr_any = function () { return null;} // should be an error - is
3030
~~~~~~~
3131
!!! error TS2322: Type '() => any' is not assignable to type 'any[]'.
32-
!!! error TS2322: Property 'push' is missing in type '() => any'.
32+
!!! error TS2322: Property 'pop' is missing in type '() => any'.
3333
arr_any = c3; // should be an error - is
3434
~~~~~~~
3535
!!! error TS2322: Type 'C3' is not assignable to type 'any[]'.

tests/baselines/reference/arrayLiterals3.errors.txt

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(32,5): error
1111
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(33,5): error TS2322: Type 'number[]' is not assignable to type '[number, number, number]'.
1212
Property '0' is missing in type 'number[]'.
1313
tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'.
14-
Types of property 'push' are incompatible.
15-
Type '(...items: (string | number)[]) => number' is not assignable to type '(...items: Number[]) => number'.
16-
Types of parameters 'items' and 'items' are incompatible.
17-
Type 'Number' is not assignable to type 'string | number'.
18-
Type 'Number' is not assignable to type 'number'.
19-
'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
14+
Types of property 'pop' are incompatible.
15+
Type '() => string | number' is not assignable to type '() => Number'.
16+
Type 'string | number' is not assignable to type 'Number'.
17+
Type 'string' is not assignable to type 'Number'.
2018

2119

2220
==== tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts (8 errors) ====
@@ -75,10 +73,8 @@ tests/cases/conformance/expressions/arrayLiterals/arrayLiterals3.ts(34,5): error
7573
var c2: myArray = [...temp1, ...temp]; // Error cannot assign (number|string)[] to number[]
7674
~~
7775
!!! error TS2322: Type '(string | number)[]' is not assignable to type 'myArray'.
78-
!!! error TS2322: Types of property 'push' are incompatible.
79-
!!! error TS2322: Type '(...items: (string | number)[]) => number' is not assignable to type '(...items: Number[]) => number'.
80-
!!! error TS2322: Types of parameters 'items' and 'items' are incompatible.
81-
!!! error TS2322: Type 'Number' is not assignable to type 'string | number'.
82-
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
83-
!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
76+
!!! error TS2322: Types of property 'pop' are incompatible.
77+
!!! error TS2322: Type '() => string | number' is not assignable to type '() => Number'.
78+
!!! error TS2322: Type 'string | number' is not assignable to type 'Number'.
79+
!!! error TS2322: Type 'string' is not assignable to type 'Number'.
8480

tests/baselines/reference/keyofAndIndexedAccess.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type K10 = keyof Shape; // "name" | "width" | "height" | "visible"
8888
>Shape : Shape
8989

9090
type K11 = keyof Shape[]; // "length" | "toString" | ...
91-
>K11 : number | "length" | "toString" | "toLocaleString" | "push" | "pop" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight"
91+
>K11 : number | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight"
9292
>Shape : Shape
9393

9494
type K12 = keyof Dictionary<Shape>; // string
@@ -108,7 +108,7 @@ type K15 = keyof E; // "toString" | "toFixed" | "toExponential" | ...
108108
>E : E
109109

110110
type K16 = keyof [string, number]; // "0" | "1" | "length" | "toString" | ...
111-
>K16 : number | "0" | "1" | "length" | "toString" | "toLocaleString" | "push" | "pop" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight"
111+
>K16 : number | "0" | "1" | "length" | "toString" | "toLocaleString" | "pop" | "push" | "concat" | "join" | "reverse" | "shift" | "slice" | "sort" | "splice" | "unshift" | "indexOf" | "lastIndexOf" | "every" | "some" | "forEach" | "map" | "filter" | "reduce" | "reduceRight"
112112

113113
type K17 = keyof (Shape | Item); // "name"
114114
>K17 : "name"

tests/baselines/reference/restInvalidArgumentType.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function f<T extends { b: string }>(p1: T, p2: T[]) {
8787
>p1 : T
8888

8989
var {...r2} = p2; // OK
90-
>r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; push(...items: T[]): number; pop(): T; concat(...items: ConcatArray<T>[]): T[]; concat(...items: (T | ConcatArray<T>)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
90+
>r2 : { [n: number]: T; length: number; toString(): string; toLocaleString(): string; pop(): T; push(...items: T[]): number; concat(...items: ConcatArray<T>[]): T[]; concat(...items: (T | ConcatArray<T>)[]): T[]; join(separator?: string): string; reverse(): T[]; shift(): T; slice(start?: number, end?: number): T[]; sort(compareFn?: (a: T, b: T) => number): T[]; splice(start: number, deleteCount?: number): T[]; splice(start: number, deleteCount: number, ...items: T[]): T[]; unshift(...items: T[]): number; indexOf(searchElement: T, fromIndex?: number): number; lastIndexOf(searchElement: T, fromIndex?: number): number; every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[]; filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T; reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T; reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U; }
9191
>p2 : T[]
9292

9393
var {...r3} = t; // Error, generic type paramter

0 commit comments

Comments
 (0)