diff --git a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt index 956fe9f6aac..bb061b341d0 100644 --- a/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt +++ b/tests/baselines/reference/contextualTypingWithFixedTypeParameters1.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(2,22): error TS2339: Property 'foo' does not exist on type 'string'. -tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -10,5 +10,5 @@ tests/cases/compiler/contextualTypingWithFixedTypeParameters1.ts(3,10): error TS !!! error TS2339: Property 'foo' does not exist on type 'string'. var r9 = f10('', () => (a => a.foo), 1); // error ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt index 861479a0cbe..12100f8442b 100644 --- a/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt +++ b/tests/baselines/reference/defaultBestCommonTypesHaveDecls.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(2,6): error TS2339: Property 'length' does not exist on type '{}'. tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(5,6): error TS2339: Property 'length' does not exist on type 'Object'. -tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -18,8 +18,8 @@ tests/cases/compiler/defaultBestCommonTypesHaveDecls.ts(8,14): error TS2448: The function concat(x: T, y: T): T { return null; } var result = concat(1, ""); // error ~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var elementCount = result.length; function concat2(x: T, y: U) { return null; } diff --git a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt index ab1e75790d9..70fcb979228 100644 --- a/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt +++ b/tests/baselines/reference/fixTypeParameterInSignatureWithRestParameters.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -6,5 +6,5 @@ tests/cases/compiler/fixTypeParameterInSignatureWithRestParameters.ts(2,1): erro function bar(item1: T, item2: T) { } bar(1, ""); // Should be ok ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt index 58b3eb595dd..cdd15b7fb21 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,10): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(26,10): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,15): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(30,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,15): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(33,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,16): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(34,16): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,15): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments.ts(35,15): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -38,27 +38,27 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r8 = foo3(1, function (a) { return '' }, 1); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r9 = foo3(1, (a) => '', ''); // string function other(t: T, u: U) { var r10 = foo2(1, (x: T) => ''); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r10 = foo2(1, (x) => ''); // string var r11 = foo3(1, (x: T) => '', ''); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r11b = foo3(1, (x: T) => '', 1); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r12 = foo3(1, function (a) { return '' }, 1); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt index d86d40c0d18..7ce5683f335 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(29,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(29,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(40,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFunctionTypedArguments2.ts(40,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -35,8 +35,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r4 = foo2(1, i2); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r4b = foo2(1, a); // any var r5 = foo2(1, i); // any var r6 = foo2('', i2); // string @@ -49,6 +49,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithFun var r7b = foo3(null, a, ''); // any var r8 = foo3(1, i2, 1); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r9 = foo3('', i2, ''); // string \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt index 35483a9623d..12d605166c1 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(18,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(19,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments.ts(19,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. @@ -24,12 +24,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r4 = foo((x: typeof a) => a, (x: typeof b) => b); // typeof a => typeof a ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. var r5 = foo((x: typeof b) => b, (x: typeof a) => a); // typeof b => typeof b ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. function other(x: T) { var r6 = foo((a: T) => a, (b: T) => b); // T => T diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index 9eedd544892..cea92ef6077 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(10,29): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(10,29): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(15,21): error TS2345: Argument of type 'Date' is not assignable to parameter of type 'T'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments2.ts(16,22): error TS2345: Argument of type 'number' is not assignable to parameter of type 'T'. @@ -23,8 +23,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var r1: (x: {}) => {} = foo((x: number) => 1, (x: string) => ''); ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. function other2(x: T) { var r7 = foo((a: T) => a, (b: T) => b); // T => T diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt index 7b9d2e0ffdc..28f142b804e 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments3.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(32,11): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(32,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(33,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGenericSignatureArguments3.ts(33,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -38,9 +38,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithGen var x: (a: string) => boolean; var r11 = foo2(x, (a1: (y: string) => string) => (n: Object) => 1, (a2: (z: string) => string) => 2); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '(y: string) => string' is not a valid type argument because it is not a supertype of candidate '(a: string) => boolean'. var r12 = foo2(x, (a1: (y: string) => boolean) => (n: Object) => 1, (a2: (z: string) => boolean) => 2); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '(n: Object) => number' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt index fc9d90a5a7e..eb8bcca96fc 100644 --- a/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt +++ b/tests/baselines/reference/genericCallWithNonSymmetricSubtypes.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(12,9): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(12,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(13,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNonSymmetricSubtypes.ts(13,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. @@ -18,12 +18,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithNon var r = foo(a, b); // { x: number; y?: number; }; ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; y?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; z?: number; }'. var r2 = foo(b, a); // { x: number; z?: number; }; ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; z?: number; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y?: number; }'. var x: { x: number; }; var y: { x?: number; }; diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt index 3cbfc0f0bab..a5702c23915 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArgs.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts(5,9): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectLiteralArgs.ts(5,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -9,8 +9,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r = foo({ bar: 1, baz: '' }); // error ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var r2 = foo({ bar: 1, baz: 1 }); // T = number var r3 = foo({ bar: foo, baz: foo }); // T = typeof foo var r4 = foo({ bar: 1, baz: '' }); // T = Object \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt index 96fdbf2a20f..39e757fc6b4 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(3,9): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(3,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(4,22): error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. Types of property 'y' are incompatible: @@ -19,8 +19,8 @@ tests/cases/compiler/genericCallWithObjectLiteralArguments1.ts(7,22): error TS23 // these are all errors var x = foo({ x: 3, y: "" }, 4); ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var x2 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt index cee7741147b..478f1404b1c 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgs.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts(20,9): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgs.ts(20,9): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'D'. @@ -24,6 +24,6 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var d1 = new X(); var r = foo(c1, d1); // error ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'D'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'D'. var r2 = foo(c1, c1); // ok \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt index 4d479516d21..b1f00ed2abd 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(18,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(18,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'. tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObjectTypeArgsAndConstraints3.ts(20,29): error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list. @@ -23,8 +23,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithObj var r1 = f({ x: new Derived(), y: new Derived2() }); // error because neither is supertype of the other ~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'Derived' is not a valid type argument because it is not a supertype of candidate 'Derived2'. function f2(a: U) { ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt index 0346a573757..03ab33e11d6 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts(36,14): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOverloadedConstructorTypedArguments.ts(36,14): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -40,8 +40,8 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithOve var r8 = foo6(a); // error ~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'number'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'number'. var r9 = foo6(b); // new any => string; new(x:any, y?:any) => string function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { diff --git a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt index 6a4c37aeb00..40d0b19fd7c 100644 --- a/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt +++ b/tests/baselines/reference/genericClassWithFunctionTypedMemberArguments.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,19): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(57,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(60,19): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(60,19): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(61,20): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(61,20): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. -tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(62,19): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFunctionTypedMemberArguments.ts(62,19): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. @@ -67,21 +67,21 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericClassWithFu function other(t: T, u: U) { var r10 = c.foo2(1, (x: T) => ''); // error ~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r10 = c.foo2(1, (x) => ''); // string var r11 = c3.foo3(1, (x: T) => '', ''); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r11b = c3.foo3(1, (x: T) => '', 1); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'T'. var r12 = c3.foo3(1, function (a) { return '' }, 1); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index dcfd7cb6b9e..2cbaba80221 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/genericRestArgs.ts(2,12): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericRestArgs.ts(2,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericRestArgs.ts(5,34): error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'. -tests/cases/compiler/genericRestArgs.ts(10,12): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/genericRestArgs.ts(10,12): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type 'number' is not assignable to parameter of type 'any[]'. @@ -10,8 +10,8 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type ' function makeArrayG(...items: T[]): T[] { return items; } var a1Ga = makeArrayG(1, ""); // no error ~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var a1Gb = makeArrayG(1, ""); var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error @@ -23,8 +23,8 @@ tests/cases/compiler/genericRestArgs.ts(12,30): error TS2345: Argument of type ' } var a2Ga = makeArrayGOpt(1, ""); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'number' is not a valid type argument because it is not a supertype of candidate 'string'. var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error ~ diff --git a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt index 0d8ddc7927c..6779ebb9c07 100644 --- a/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt +++ b/tests/baselines/reference/parser15.4.4.14-9-2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,15): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'string'. tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error TS2304: Cannot find name 'runTestCase'. @@ -21,8 +21,8 @@ tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error T var _float = -(4/3); var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3)); ~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'string'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'boolean' is not a valid type argument because it is not a supertype of candidate 'string'. if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3) a.indexOf(0) === 7 && // a[7] = +0, 0===+0 a.indexOf(-0) === 7 && // a[7] = +0, -0===+0 diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 912ee8b9b32..855614eb76e 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -20,19 +20,19 @@ tests/cases/compiler/promisePermutations.ts(120,19): error TS2345: Argument of t tests/cases/compiler/promisePermutations.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations.ts(122,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(126,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(129,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations.ts(129,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations.ts(134,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(137,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations.ts(137,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(144,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations.ts(144,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(152,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations.ts(152,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations.ts(156,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations.ts(158,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -215,9 +215,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error @@ -233,9 +233,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -244,9 +244,9 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -256,8 +256,8 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2345: Argument of t var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index e9c86458942..5338df82121 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -20,19 +20,19 @@ tests/cases/compiler/promisePermutations2.ts(119,19): error TS2345: Argument of tests/cases/compiler/promisePermutations2.ts(120,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations2.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(125,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(128,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations2.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations2.ts(131,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(136,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations2.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(143,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations2.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(151,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations2.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations2.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -214,9 +214,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error @@ -232,9 +232,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -243,9 +243,9 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -255,8 +255,8 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 8c142e62dc9..58e37629cf5 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -21,19 +21,19 @@ tests/cases/compiler/promisePermutations3.ts(119,19): error TS2345: Argument of tests/cases/compiler/promisePermutations3.ts(120,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations3.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(125,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(128,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations3.ts(128,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations3.ts(131,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(132,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations3.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(136,11): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations3.ts(136,11): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(143,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations3.ts(143,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(151,12): error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/promisePermutations3.ts(151,12): error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(157,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. @@ -218,9 +218,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error @@ -236,9 +236,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -247,9 +247,9 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': -!!! error TS2448: Type 'string' is not assignable to type 'number'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'IPromise' is not a valid type argument because it is not a supertype of candidate 'IPromise': +!!! error TS2453: Type 'string' is not assignable to type 'number'. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -259,8 +259,8 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. +!!! error TS2453: The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'Promise' is not a valid type argument because it is not a supertype of candidate 'IPromise'. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; diff --git a/tests/baselines/reference/typeArgInference2.errors.txt b/tests/baselines/reference/typeArgInference2.errors.txt index 87268f687b8..21fa647f442 100644 --- a/tests/baselines/reference/typeArgInference2.errors.txt +++ b/tests/baselines/reference/typeArgInference2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgInference2.ts(12,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgInference2.ts(12,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. @@ -16,5 +16,5 @@ tests/cases/compiler/typeArgInference2.ts(12,10): error TS2448: The type argumen var z5 = foo({ name: "abc", a: 5 }); // { name: string; a: number } var z6 = foo({ name: "abc", a: 5 }, { name: "def", b: 5 }); // error ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ name: string; a: number; }' is not a valid type argument because it is not a supertype of candidate '{ name: string; b: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgInference2WithError.errors.txt b/tests/baselines/reference/typeArgInference2WithError.errors.txt index 473cfbfc41b..3d3e4d35426 100644 --- a/tests/baselines/reference/typeArgInference2WithError.errors.txt +++ b/tests/baselines/reference/typeArgInference2WithError.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -11,5 +11,5 @@ tests/cases/compiler/typeArgInference2WithError.ts(7,10): error TS2448: The type var z7 = foo("abc", 5); // Error ~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInference.errors.txt b/tests/baselines/reference/typeArgumentInference.errors.txt index 159a08c53a6..8003c0c0e6e 100644 --- a/tests/baselines/reference/typeArgumentInference.errors.txt +++ b/tests/baselines/reference/typeArgumentInference.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(68,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. @@ -74,8 +74,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11 } var a9a = someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; @@ -91,8 +91,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInference.ts(82,11 } var a9e = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; z: Date; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. var a9e: {}; var a9f = someGenerics9(undefined, { x: 6, z: new Date() }, { x: 6, y: '' }); var a9f: A92; diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index dd86ddcd234..de36203acb0 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -3,10 +3,10 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(61,39): error TS2345: Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(71,39): error TS2345: Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(81,45): error TS2345: Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,15): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(106,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(118,9): error TS2304: Cannot find name 'Window'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,15): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(120,51): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstructSignatures.ts(122,56): error TS2304: Cannot find name 'window'. @@ -130,8 +130,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct var someGenerics9: someGenerics9; var a9a = new someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = new someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; @@ -149,8 +149,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceConstruct } var a9e = new someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt index f8e90a5404b..96698bc80c1 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraintAsCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'Giraffe' is not a valid type argument because it is not a supertype of candidate 'Elephant'. @@ -11,5 +11,5 @@ tests/cases/compiler/typeArgumentInferenceWithConstraintAsCommonRoot.ts(7,1): er var e: Elephant; f(g, e); // valid because both Giraffe and Elephant satisfy the constraint. T is Animal ~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'Giraffe' is not a valid type argument because it is not a supertype of candidate 'Elephant'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'Giraffe' is not a valid type argument because it is not a supertype of candidate 'Elephant'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index 469171e341c..722f28772dd 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -8,10 +8,10 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(49,15): error TS2344: Type 'string' does not satisfy the constraint 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(55,41): error TS2345: Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(66,31): error TS2345: Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,11): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(73,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(85,9): error TS2304: Cannot find name 'Window'. -tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,11): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(87,47): error TS2304: Cannot find name 'window'. tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConstraints.ts(89,52): error TS2304: Cannot find name 'window'. @@ -112,8 +112,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst } var a9a = someGenerics9('', 0, []); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. var a9a: {}; var a9b = someGenerics9<{ a?: number; b?: string; }>({ a: 0 }, { b: '' }, null); var a9b: { a?: number; b?: string; }; @@ -131,8 +131,8 @@ tests/cases/conformance/expressions/functionCalls/typeArgumentInferenceWithConst } var a9e = someGenerics9(undefined, { x: 6, z: window }, { x: 6, y: '' }); ~~~~~~~~~~~~~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate '{ x: number; z: any; }' is not a valid type argument because it is not a supertype of candidate '{ x: number; y: string; }'. ~~~~~~ !!! error TS2304: Cannot find name 'window'. var a9e: {}; diff --git a/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt b/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt index 1213c2b1e75..836555d7e89 100644 --- a/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt +++ b/tests/baselines/reference/typeInferenceConflictingCandidates.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. @@ -7,5 +7,5 @@ tests/cases/compiler/typeInferenceConflictingCandidates.ts(3,1): error TS2448: T g("", 3, a => a); ~ -!!! error TS2448: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: -!!! error TS2448: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file +!!! error TS2453: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly: +!!! error TS2453: Type argument candidate 'string' is not a valid type argument because it is not a supertype of candidate 'number'. \ No newline at end of file