Skip to content

Commit a008792

Browse files
Updated baselines.
1 parent afe90f1 commit a008792

10 files changed

+36
-36
lines changed

tests/baselines/reference/conditionalTypes1.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(159,5): error TS2
4444
Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
4545
'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
4646
Type 'number' is not assignable to type 'T'.
47-
'0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
47+
'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
4848
Type 'string | number' is not assignable to type 'T'.
49-
'"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
49+
'string | number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
5050
Type 'string' is not assignable to type 'T'.
51-
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
51+
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
5252
tests/cases/conformance/types/conditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.
5353
Type 'string | number' is not assignable to type 'ZeroOf<T>'.
5454
Type 'string' is not assignable to type 'ZeroOf<T>'.
@@ -284,11 +284,11 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(288,43): error TS
284284
!!! error TS2322: Type '0 | (T extends string ? "" : false)' is not assignable to type 'T'.
285285
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '0 | (T extends string ? "" : false)'.
286286
!!! error TS2322: Type 'number' is not assignable to type 'T'.
287-
!!! error TS2322: '0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
287+
!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
288288
!!! error TS2322: Type 'string | number' is not assignable to type 'T'.
289-
!!! error TS2322: '"" | 0' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
289+
!!! error TS2322: 'string | number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
290290
!!! error TS2322: Type 'string' is not assignable to type 'T'.
291-
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
291+
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string | number'.
292292
y = x; // Error
293293
~
294294
!!! error TS2322: Type 'T' is not assignable to type 'ZeroOf<T>'.

tests/baselines/reference/constructorImplementationWithDefaultValues2.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(3,17): error TS2322: Type 'number' is not assignable to type 'string'.
22
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,17): error TS2322: Type 'number' is not assignable to type 'T'.
3-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
3+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
44
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(10,27): error TS2322: Type 'T' is not assignable to type 'U'.
55
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
66
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorImplementationWithDefaultValues2.ts(17,17): error TS2322: Type 'Date' is not assignable to type 'T'.
@@ -22,7 +22,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorParameters/co
2222
constructor(x: T = 1, public y: U = x) { // error
2323
~~~~~~~~
2424
!!! error TS2322: Type 'number' is not assignable to type 'T'.
25-
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
25+
!!! error TS2322: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
2626
~~~~~~~~~~~~~~~
2727
!!! error TS2322: Type 'T' is not assignable to type 'U'.
2828
!!! error TS2322: 'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.

tests/baselines/reference/derivedGenericClassWithAny.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
33
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
44
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
55
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(30,18): error TS2322: Type 'string' is not assignable to type 'T'.
6-
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
6+
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
77
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(32,9): error TS2322: Type 'string' is not assignable to type 'T'.
8-
'""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
8+
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
99
tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericClassWithAny.ts(41,1): error TS2322: Type 'E<string>' is not assignable to type 'C<number>'.
1010
Types of property 'x' are incompatible.
1111
Type 'string' is not assignable to type 'number'.
@@ -52,12 +52,12 @@ tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedGenericC
5252
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
5353
~~~~~~~~~~
5454
!!! error TS2322: Type 'string' is not assignable to type 'T'.
55-
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
55+
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
5656
foo(): T {
5757
return ''; // error
5858
~~~~~~~~~~
5959
!!! error TS2322: Type 'string' is not assignable to type 'T'.
60-
!!! error TS2322: '""' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
60+
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'string'.
6161
}
6262
}
6363

tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
33
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,23): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
44
Types of parameters 'x' and 'a' are incompatible.
55
Type 'number' is not assignable to type 'T'.
6-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
6+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
77
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,23): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
88
Types of parameters 'x' and 'a' are incompatible.
99
Type 'number' is not assignable to type 'T'.
10-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
10+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
1111
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,24): error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
1212
Types of parameters 'x' and 'a' are incompatible.
1313
Type 'number' is not assignable to type 'T'.
14-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
14+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
1515
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,23): error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'.
1616
Type 'string' is not assignable to type '1'.
1717

@@ -54,21 +54,21 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun
5454
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
5555
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
5656
!!! error TS2345: Type 'number' is not assignable to type 'T'.
57-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
57+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
5858
var r10 = foo2(1, (x) => ''); // string
5959

6060
var r11 = foo3(1, (x: T) => '', ''); // error
6161
~~~~~~~~~~~~
6262
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
6363
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
6464
!!! error TS2345: Type 'number' is not assignable to type 'T'.
65-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
65+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
6666
var r11b = foo3(1, (x: T) => '', 1); // error
6767
~~~~~~~~~~~~
6868
!!! error TS2345: Argument of type '(x: T) => string' is not assignable to parameter of type '(a: 1) => string'.
6969
!!! error TS2345: Types of parameters 'x' and 'a' are incompatible.
7070
!!! error TS2345: Type 'number' is not assignable to type 'T'.
71-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
71+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
7272
var r12 = foo3(1, function (a) { return '' }, 1); // error
7373
~~~~~~~~
7474
!!! error TS2345: Argument of type '(a: number) => string' is not assignable to parameter of type '(a: number) => 1'.

tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
44
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
55
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
66
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
7-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
7+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
88
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(25,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
99
Types of parameters 'a' and 'x' are incompatible.
1010
Type 'Date' is not assignable to type 'T'.
@@ -13,7 +13,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
1313
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(50,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'.
1414
'Date' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Date'.
1515
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(51,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
16-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
16+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
1717
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(60,23): error TS2345: Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'.
1818
Types of parameters 'a' and 'x' are incompatible.
1919
Type 'Date' is not assignable to type 'T'.
@@ -48,7 +48,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
4848
var r10 = r7(1); // error
4949
~
5050
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
51-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
51+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
5252
}
5353

5454
function foo2<T extends Date>(a: (x: T) => T, b: (x: T) => T) {
@@ -97,7 +97,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen
9797
var r10 = r7(1);
9898
~
9999
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
100-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
100+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
101101
}
102102

103103
function foo2<T extends Date, U extends Date>(a: (x: T) => T, b: (x: U) => U) {

tests/baselines/reference/genericCallWithObjectTypeArgsAndInitializers.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(5,33): error TS2322: Type 'number' is not assignable to type 'T'.
2-
'1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
2+
'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
33
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(6,37): error TS2322: Type 'T' is not assignable to type 'U'.
44
'U' could be instantiated with an arbitrary type which could be unrelated to 'T'.
55
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericCallWithObjectTypeArgsAndInitializers.ts(8,56): error TS2322: Type 'U' is not assignable to type 'V'.
@@ -16,7 +16,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/genericC
1616
function foo3<T extends Number>(x: T = 1) { } // error
1717
~~~~~~~~
1818
!!! error TS2322: Type 'number' is not assignable to type 'T'.
19-
!!! error TS2322: '1' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
19+
!!! error TS2322: 'number' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Number'.
2020
function foo4<T, U extends T>(x: T, y: U = x) { } // error
2121
~~~~~~~~
2222
!!! error TS2322: Type 'T' is not assignable to type 'U'.

tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(2,16): error TS2558: Expected 0 type arguments, but got 1.
22
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(3,16): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
3-
'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
3+
'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
44
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(4,16): error TS2558: Expected 0 type arguments, but got 1.
55
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(8,17): error TS2558: Expected 0 type arguments, but got 1.
66
tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(9,17): error TS2558: Expected 0 type arguments, but got 1.
@@ -18,7 +18,7 @@ tests/cases/compiler/genericCallbackInvokedInsideItsContainingFunction1.ts(14,17
1818
var r2 = f(1);
1919
~
2020
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'.
21-
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to '1'.
21+
!!! error TS2345: 'T' could be instantiated with an arbitrary type which could be unrelated to 'number'.
2222
var r3 = f<any>(null);
2323
~~~
2424
!!! error TS2558: Expected 0 type arguments, but got 1.

0 commit comments

Comments
 (0)