From 511402cd84eaa8b1512245686932c2eae92fd256 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 24 Jul 2014 19:39:50 -0700 Subject: [PATCH] Addressing CR feedback. --- src/compiler/checker.ts | 4 +- .../diagnosticInformationMap.generated.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- .../reference/arrayAssignmentTest3.errors.txt | 2 +- .../arrayLiteralContextualType.errors.txt | 4 +- ...ambdaToNominalSubtypeOfFunction.errors.txt | 4 +- .../reference/assignmentCompatBug5.errors.txt | 8 +-- ...CompatFunctionsWithOptionalArgs.errors.txt | 4 +- ...terfaceWithStringIndexSignature.errors.txt | 2 +- ...ember-off-of-function-interface.errors.txt | 8 +-- ...ember-off-of-function-interface.errors.txt | 8 +-- .../baselines/reference/baseCheck.errors.txt | 2 +- ...dBeResolvedBeforeSpecialization.errors.txt | 2 +- ...uresThatDifferOnlyByReturnType2.errors.txt | 2 +- ...ConstrainedToOtherTypeParameter.errors.txt | 2 +- ...onstrainedToOtherTypeParameter2.errors.txt | 4 +- .../constructorOverloads1.errors.txt | 4 +- .../reference/contextualTyping30.errors.txt | 2 +- .../reference/contextualTyping33.errors.txt | 2 +- ...fGenericFunctionTypedArguments1.errors.txt | 4 +- ...ontextualTypingOfObjectLiterals.errors.txt | 2 +- ...efaultArgsInFunctionExpressions.errors.txt | 2 +- ...ssignmentConstrainedGenericType.errors.txt | 2 +- .../reference/functionCall10.errors.txt | 4 +- .../reference/functionCall11.errors.txt | 2 +- .../reference/functionCall12.errors.txt | 4 +- .../reference/functionCall13.errors.txt | 2 +- .../reference/functionCall14.errors.txt | 2 +- .../reference/functionCall16.errors.txt | 4 +- .../reference/functionCall17.errors.txt | 6 +- .../reference/functionCall6.errors.txt | 2 +- .../reference/functionCall7.errors.txt | 2 +- .../reference/functionCall8.errors.txt | 2 +- .../reference/functionCall9.errors.txt | 2 +- ...functionConstraintSatisfaction2.errors.txt | 22 ++++---- .../reference/functionOverloads.errors.txt | 2 +- .../reference/functionOverloads2.errors.txt | 2 +- .../reference/functionOverloads27.errors.txt | 2 +- .../reference/functionOverloads40.errors.txt | 2 +- .../reference/functionOverloads41.errors.txt | 2 +- ...nstraintsTypeArgumentInference2.errors.txt | 2 +- ...lWithConstructorTypedArguments5.errors.txt | 4 +- ...CallWithFunctionTypedArguments5.errors.txt | 4 +- ...lWithGenericSignatureArguments2.errors.txt | 8 +-- ...CallWithObjectLiteralArguments1.errors.txt | 8 +-- ...thObjectTypeArgsAndConstraints4.errors.txt | 2 +- ...thObjectTypeArgsAndConstraints5.errors.txt | 2 +- ...oadedConstructorTypedArguments2.errors.txt | 2 +- ...erloadedFunctionTypedArguments2.errors.txt | 2 +- ...kedInsideItsContainingFunction1.errors.txt | 4 +- .../reference/genericCombinators2.errors.txt | 4 +- .../genericConstraintSatisfaction1.errors.txt | 2 +- .../reference/genericNewInterface.errors.txt | 4 +- .../reference/genericRestArgs.errors.txt | 4 +- .../genericWithOpenTypeParameters1.errors.txt | 2 +- .../heterogeneousArrayAndOverloads.errors.txt | 2 +- .../reference/incompatibleTypes.errors.txt | 4 +- .../indexSignatureTypeInference.errors.txt | 2 +- ...eritedConstructorWithRestParams.errors.txt | 4 +- ...ritedConstructorWithRestParams2.errors.txt | 6 +- .../interfaceAssignmentCompat.errors.txt | 2 +- ...onExpressionInFunctionParameter.errors.txt | 2 +- .../reference/lambdaArgCrash.errors.txt | 2 +- .../lastPropertyInLiteralWins.errors.txt | 2 +- .../reference/maxConstraints.errors.txt | 2 +- ...citTypeParameterAndArgumentType.errors.txt | 2 +- .../reference/noErrorsInCallback.errors.txt | 4 +- .../reference/numberToString.errors.txt | 2 +- ...onExpressionInFunctionParameter.errors.txt | 2 +- .../objectLitTargetTypeCallSite.errors.txt | 2 +- ...eralFunctionArgContextualTyping.errors.txt | 6 +- ...ralFunctionArgContextualTyping2.errors.txt | 12 ++-- .../baselines/reference/overload1.errors.txt | 2 +- ...rloadOnConstNoAnyImplementation.errors.txt | 2 +- ...loadOnConstNoAnyImplementation2.errors.txt | 2 +- ...loadOnConstantsInvalidOverload1.errors.txt | 2 +- .../reference/overloadResolution.errors.txt | 12 ++-- ...loadResolutionClassConstructors.errors.txt | 14 ++--- .../overloadResolutionConstructors.errors.txt | 12 ++-- .../overloadResolutionOverCTLambda.errors.txt | 2 +- .../overloadResolutionTest1.errors.txt | 6 +- .../overloadingOnConstants2.errors.txt | 2 +- ...nWithConstraintCheckingDeferred.errors.txt | 6 +- .../overloadsWithProvisionalErrors.errors.txt | 4 +- .../reference/parser536727.errors.txt | 4 +- .../primitiveConstraints2.errors.txt | 2 +- .../reference/promiseChaining1.errors.txt | 2 +- .../reference/promiseChaining2.errors.txt | 2 +- .../reference/promisePermutations.errors.txt | 50 ++++++++--------- .../reference/promisePermutations2.errors.txt | 56 +++++++++---------- .../reference/promisePermutations3.errors.txt | 56 +++++++++---------- .../recursiveClassReferenceTest.errors.txt | 2 +- .../recursiveFunctionTypes.errors.txt | 6 +- ...edSignatureAsCallbackParameter1.errors.txt | 4 +- .../stringPropertyAccessWithError.errors.txt | 2 +- .../subtypingWithCallSignaturesA.errors.txt | 2 +- ...ommaInHeterogenousArrayLiteral1.errors.txt | 4 +- .../typeArgInference2WithError.errors.txt | 2 +- ...entInferenceConstructSignatures.errors.txt | 8 +-- .../typeArgumentInferenceErrors.errors.txt | 8 +-- ...rgumentInferenceWithConstraints.errors.txt | 10 ++-- ...OnFunctionsWithNoTypeParameters.errors.txt | 2 +- ...eAssertionToGenericFunctionType.errors.txt | 2 +- .../typeIdentityConsidersBrands.errors.txt | 2 +- .../reference/typeOfOnTypeArg.errors.txt | 2 +- .../undeclaredModuleError.errors.txt | 2 +- tests/baselines/reference/vararg.errors.txt | 8 +-- .../reference/voidArrayLit.errors.txt | 2 +- ...wrappedAndRecursiveConstraints4.errors.txt | 2 +- 109 files changed, 281 insertions(+), 281 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0a191a5ccde..e55983b91fe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3743,8 +3743,8 @@ module ts { checkExpression(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); // Use argument expression as error location when reporting errors var isValidArgument = checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, - Diagnostics.Argument_type_0_is_not_assignable_to_parameter_type_1, - Diagnostics.Argument_type_0_is_not_assignable_to_parameter_type_1); + Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, + Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1); if (!isValidArgument) { return false; } diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 20f3a2dc2dc..3d1e32147dc 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -190,7 +190,7 @@ module ts { Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 3033, category: DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." }, Duplicate_function_implementation: { code: 3034, category: DiagnosticCategory.Error, key: "Duplicate function implementation." }, Overload_signature_is_not_compatible_with_function_implementation: { code: 3035, category: DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." }, - Argument_type_0_is_not_assignable_to_parameter_type_1: { code: 3036, category: DiagnosticCategory.Error, key: "Argument type '{0}' is not assignable to parameter type '{1}'." }, + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 3036, category: DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, Index_signature_is_missing_in_type_0: { code: 4003, category: DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." }, Index_signatures_are_incompatible_Colon: { code: 4004, category: DiagnosticCategory.Error, key: "Index signatures are incompatible:" }, Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 4016, category: DiagnosticCategory.NoPrefix, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7be0362eecd..ff70e97d79e 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -753,7 +753,7 @@ "category": "Error", "code": 3035 }, - "Argument type '{0}' is not assignable to parameter type '{1}'.": { + "Argument of type '{0}' is not assignable to parameter of type '{1}'.": { "category": "Error", "code": 3036 }, diff --git a/tests/baselines/reference/arrayAssignmentTest3.errors.txt b/tests/baselines/reference/arrayAssignmentTest3.errors.txt index be22174a75a..4214ae5ef82 100644 --- a/tests/baselines/reference/arrayAssignmentTest3.errors.txt +++ b/tests/baselines/reference/arrayAssignmentTest3.errors.txt @@ -12,6 +12,6 @@ var xx = new a(null, 7, new B()); ~~~~~~~ -!!! Argument type 'B' is not assignable to parameter type 'B[]'. +!!! Argument of type 'B' is not assignable to parameter of type 'B[]'. \ No newline at end of file diff --git a/tests/baselines/reference/arrayLiteralContextualType.errors.txt b/tests/baselines/reference/arrayLiteralContextualType.errors.txt index 6c95d149f93..e653cfc303a 100644 --- a/tests/baselines/reference/arrayLiteralContextualType.errors.txt +++ b/tests/baselines/reference/arrayLiteralContextualType.errors.txt @@ -28,8 +28,8 @@ var arr = [new Giraffe(), new Elephant()]; foo(arr); // Error because of no contextual type ~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'IAnimal[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'IAnimal[]'. !!! Type '{}' is not assignable to type 'IAnimal'. bar(arr); // Error because of no contextual type ~~~ -!!! Argument type '{}[]' is not assignable to parameter type '{ [x: number]: IAnimal; }'. \ No newline at end of file +!!! Argument of type '{}[]' is not assignable to parameter of type '{ [x: number]: IAnimal; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt index 5b41d17ba53..78c710a7d50 100644 --- a/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt +++ b/tests/baselines/reference/assignLambdaToNominalSubtypeOfFunction.errors.txt @@ -7,10 +7,10 @@ fn((a, b) => true); ~~~~~~~~~~~~~~ -!!! Argument type '(a: any, b: any) => boolean' is not assignable to parameter type 'IResultCallback'. +!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. !!! Property 'x' is missing in type '(a: any, b: any) => boolean'. fn(function (a, b) { return true; }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(a: any, b: any) => boolean' is not assignable to parameter type 'IResultCallback'. +!!! Argument of type '(a: any, b: any) => boolean' is not assignable to parameter of type 'IResultCallback'. !!! Property 'x' is missing in type '(a: any, b: any) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatBug5.errors.txt b/tests/baselines/reference/assignmentCompatBug5.errors.txt index 3f2cc38d33c..cd8f24cee3f 100644 --- a/tests/baselines/reference/assignmentCompatBug5.errors.txt +++ b/tests/baselines/reference/assignmentCompatBug5.errors.txt @@ -2,21 +2,21 @@ function foo1(x: { a: number; }) { } foo1({ b: 5 }); ~~~~~~~~ -!!! Argument type '{ b: number; }' is not assignable to parameter type '{ a: number; }'. +!!! Argument of type '{ b: number; }' is not assignable to parameter of type '{ a: number; }'. !!! Property 'a' is missing in type '{ b: number; }'. function foo2(x: number[]) { } foo2(["s", "t"]); ~~~~~~~~~~ -!!! Argument type 'string[]' is not assignable to parameter type 'number[]'. +!!! Argument of type 'string[]' is not assignable to parameter of type 'number[]'. !!! Type 'string' is not assignable to type 'number'. function foo3(x: (n: number) =>number) { }; foo3((s:string) => { }); ~~~~~~~~~~~~~~~~~ -!!! Argument type '(s: string) => void' is not assignable to parameter type '(n: number) => number'. +!!! Argument of type '(s: string) => void' is not assignable to parameter of type '(n: number) => number'. foo3((n) => { return; }); ~~~~~~~~~~~~~~~~~~ -!!! Argument type '(n: number) => void' is not assignable to parameter type '(n: number) => number'. +!!! Argument of type '(n: number) => void' is not assignable to parameter of type '(n: number) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt index 1f48ee0c4a5..2abf97a25de 100644 --- a/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt +++ b/tests/baselines/reference/assignmentCompatFunctionsWithOptionalArgs.errors.txt @@ -6,10 +6,10 @@ foo({ id: 1234, name: "hello" }); // Ok foo({ id: 1234, name: false }); // Error, name of wrong type ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ id: number; name: boolean; }' is not assignable to parameter type '{ id: number; name?: string; }'. +!!! Argument of type '{ id: number; name: boolean; }' is not assignable to parameter of type '{ id: number; name?: string; }'. !!! Types of property 'name' are incompatible: !!! Type 'boolean' is not assignable to type 'string'. foo({ name: "hello" }); // Error, id required but missing ~~~~~~~~~~~~~~~~~ -!!! Argument type '{ name: string; }' is not assignable to parameter type '{ id: number; name?: string; }'. +!!! Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string; }'. !!! Property 'id' is missing in type '{ name: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt index 6e8b63f045b..7d84f69b3d2 100644 --- a/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt +++ b/tests/baselines/reference/assignmentCompatInterfaceWithStringIndexSignature.errors.txt @@ -15,5 +15,5 @@ Biz(new Foo()); ~~~~~~~~~ -!!! Argument type 'Foo' is not assignable to parameter type 'IHandlerMap'. +!!! Argument of type 'Foo' is not assignable to parameter of type 'IHandlerMap'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt index aab0e57d603..fdb719715eb 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-apply-member-off-of-function-interface.errors.txt @@ -34,16 +34,16 @@ // Should Fail fn(''); ~~ -!!! Argument type 'string' is not assignable to parameter type 'Applicable'. +!!! Argument of type 'string' is not assignable to parameter of type 'Applicable'. fn(['']); ~~~~ -!!! Argument type 'string[]' is not assignable to parameter type 'Applicable'. +!!! Argument of type 'string[]' is not assignable to parameter of type 'Applicable'. fn(4); ~ -!!! Argument type 'number' is not assignable to parameter type 'Applicable'. +!!! Argument of type 'number' is not assignable to parameter of type 'Applicable'. fn({}); ~~ -!!! Argument type '{}' is not assignable to parameter type 'Applicable'. +!!! Argument of type '{}' is not assignable to parameter of type 'Applicable'. !!! Property 'apply' is missing in type '{}'. diff --git a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt index b173619e074..91c3cee4293 100644 --- a/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt +++ b/tests/baselines/reference/assignmentCompatability_checking-call-member-off-of-function-interface.errors.txt @@ -34,16 +34,16 @@ // Should Fail fn(''); ~~ -!!! Argument type 'string' is not assignable to parameter type 'Callable'. +!!! Argument of type 'string' is not assignable to parameter of type 'Callable'. fn(['']); ~~~~ -!!! Argument type 'string[]' is not assignable to parameter type 'Callable'. +!!! Argument of type 'string[]' is not assignable to parameter of type 'Callable'. fn(4); ~ -!!! Argument type 'number' is not assignable to parameter type 'Callable'. +!!! Argument of type 'number' is not assignable to parameter of type 'Callable'. fn({}); ~~ -!!! Argument type '{}' is not assignable to parameter type 'Callable'. +!!! Argument of type '{}' is not assignable to parameter of type 'Callable'. !!! Property 'call' is missing in type '{}'. diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index d1ed2f9dfbe..a09491ac455 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -27,7 +27,7 @@ !!! 'this' cannot be referenced in current location. class F extends C { constructor(public z: number) { super("hello", this.z) } } // first param type ~~~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. ~~~~ !!! 'this' cannot be referenced in current location. diff --git a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt index 4f26b735fae..349e8513e70 100644 --- a/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt +++ b/tests/baselines/reference/callSignaturesShouldBeResolvedBeforeSpecialization.errors.txt @@ -9,5 +9,5 @@ test("expects boolean instead of string"); // should not error - "test" should not expect a boolean test(true); // should error - string expected ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'string'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt index 2f7fccc0122..b0df8303150 100644 --- a/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt +++ b/tests/baselines/reference/callSignaturesThatDifferOnlyByReturnType2.errors.txt @@ -16,5 +16,5 @@ var r = x.foo(1); // no error var r2 = x.foo(''); // error ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt index 4c361117c32..0448b6d44a0 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter.errors.txt @@ -19,4 +19,4 @@ // Ok to go down the chain, but error to try to climb back up (new Chain(new A)).then(a => new B).then(b => new C).then(c => new B).then(b => new A); ~~~~~~~~~~ -!!! Argument type '(c: C) => B' is not assignable to parameter type '(x: C) => C'. \ No newline at end of file +!!! Argument of type '(c: C) => B' is not assignable to parameter of type '(x: C) => C'. \ No newline at end of file diff --git a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt index 421cbd50699..3cb1395700d 100644 --- a/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt +++ b/tests/baselines/reference/chainedCallsWithTypeParameterConstrainedToOtherTypeParameter2.errors.txt @@ -7,12 +7,12 @@ // Ok to go down the chain, but error to climb up the chain (new Chain(t)).then(tt => s).then(ss => t); ~~~~~~~ -!!! Argument type '(ss: S) => T' is not assignable to parameter type '(x: S) => S'. +!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // But error to try to climb up the chain (new Chain(s)).then(ss => t); ~~~~~~~ -!!! Argument type '(ss: S) => T' is not assignable to parameter type '(x: S) => S'. +!!! Argument of type '(ss: S) => T' is not assignable to parameter of type '(x: S) => S'. // Staying at T or S should be fine (new Chain(t)).then(tt => t).then(tt => t).then(tt => t); diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index acbeaa10194..c11e69d12bb 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -20,10 +20,10 @@ var f2 = new Foo(0); var f3 = new Foo(f1); ~~ -!!! Argument type 'Foo' is not assignable to parameter type 'number'. +!!! Argument of type 'Foo' is not assignable to parameter of type 'number'. var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~ -!!! Argument type 'unknown[]' is not assignable to parameter type 'number'. +!!! Argument of type 'unknown[]' is not assignable to parameter of type 'number'. f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/contextualTyping30.errors.txt b/tests/baselines/reference/contextualTyping30.errors.txt index 9966a708ab4..259f59faac7 100644 --- a/tests/baselines/reference/contextualTyping30.errors.txt +++ b/tests/baselines/reference/contextualTyping30.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping30.ts (1 errors) ==== function foo(param:number[]){}; foo([1, "a"]); ~~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'number[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. !!! Type '{}' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTyping33.errors.txt b/tests/baselines/reference/contextualTyping33.errors.txt index e59f3572ef3..adf233b4934 100644 --- a/tests/baselines/reference/contextualTyping33.errors.txt +++ b/tests/baselines/reference/contextualTyping33.errors.txt @@ -1,5 +1,5 @@ ==== tests/cases/compiler/contextualTyping33.ts (1 errors) ==== function foo(param: {():number; (i:number):number; }[]) { }; foo([function(){return 1;}, function(){return "foo"}]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type '{ (): number; (i: number): number; }[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type '{ (): number; (i: number): number; }[]'. !!! Type '{}' is not assignable to type '{ (): number; (i: number): number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt index 564268d164b..2a768d452bf 100644 --- a/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt +++ b/tests/baselines/reference/contextualTypingOfGenericFunctionTypedArguments1.errors.txt @@ -16,8 +16,8 @@ var f = (x: number) => { return x.toFixed() }; var r5 = _.forEach(c2, f); ~ -!!! Argument type '(x: number) => string' is not assignable to parameter type '(x: number) => Date'. +!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. var r6 = _.forEach(c2, (x) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: number) => string' is not assignable to parameter type '(x: number) => Date'. +!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt index 096def4e11d..2e3633b4d64 100644 --- a/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt +++ b/tests/baselines/reference/contextualTypingOfObjectLiterals.errors.txt @@ -13,4 +13,4 @@ f(obj1); // Ok f(obj2); // Error - indexer doesn't match ~~~~ -!!! Argument type '{ x: string; }' is not assignable to parameter type '{ [x: string]: string; }'. \ No newline at end of file +!!! Argument of type '{ x: string; }' is not assignable to parameter of type '{ [x: string]: string; }'. \ No newline at end of file diff --git a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt index baeea2b00a4..b34c4902000 100644 --- a/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt +++ b/tests/baselines/reference/defaultArgsInFunctionExpressions.errors.txt @@ -4,7 +4,7 @@ n = f(); var s: string = f(''); ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. s = f(); ~ !!! Type 'number' is not assignable to type 'string'. diff --git a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt index 218d76be71a..9b933cc439d 100644 --- a/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt +++ b/tests/baselines/reference/exportAssignmentConstrainedGenericType.errors.txt @@ -2,7 +2,7 @@ import foo = require("./foo_0"); var x = new foo(true); // Should error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type '{ a: string; b: number; }'. +!!! Argument of type 'boolean' is not assignable to parameter of type '{ a: string; b: number; }'. var y = new foo({a: "test", b: 42}); // Should be OK var z: number = y.test.b; ==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/functionCall10.errors.txt b/tests/baselines/reference/functionCall10.errors.txt index 2e9b0df7372..5ae80cff0e8 100644 --- a/tests/baselines/reference/functionCall10.errors.txt +++ b/tests/baselines/reference/functionCall10.errors.txt @@ -3,9 +3,9 @@ foo(0, 1); foo('foo'); ~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. foo(); foo(1, 'bar'); ~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall11.errors.txt b/tests/baselines/reference/functionCall11.errors.txt index 4db638a8ffa..91593adb4e5 100644 --- a/tests/baselines/reference/functionCall11.errors.txt +++ b/tests/baselines/reference/functionCall11.errors.txt @@ -7,7 +7,7 @@ !!! Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/functionCall12.errors.txt b/tests/baselines/reference/functionCall12.errors.txt index dc156bfc4b7..1a89772d74e 100644 --- a/tests/baselines/reference/functionCall12.errors.txt +++ b/tests/baselines/reference/functionCall12.errors.txt @@ -7,9 +7,9 @@ !!! Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 'bar'); foo('foo', 1, 3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionCall13.errors.txt b/tests/baselines/reference/functionCall13.errors.txt index 3f6dbd4dd92..72a06c77c94 100644 --- a/tests/baselines/reference/functionCall13.errors.txt +++ b/tests/baselines/reference/functionCall13.errors.txt @@ -7,6 +7,6 @@ !!! Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall14.errors.txt b/tests/baselines/reference/functionCall14.errors.txt index f91e2c20507..adfd2530532 100644 --- a/tests/baselines/reference/functionCall14.errors.txt +++ b/tests/baselines/reference/functionCall14.errors.txt @@ -5,6 +5,6 @@ foo(); foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall16.errors.txt b/tests/baselines/reference/functionCall16.errors.txt index 257d9d86cb0..f29d90f56c2 100644 --- a/tests/baselines/reference/functionCall16.errors.txt +++ b/tests/baselines/reference/functionCall16.errors.txt @@ -2,7 +2,7 @@ function foo(a:string, b?:string, ...c:number[]){} foo('foo', 1); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo('foo', 'bar'); foo(); @@ -10,6 +10,6 @@ !!! Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall17.errors.txt b/tests/baselines/reference/functionCall17.errors.txt index 338b8df184b..f6280586cb2 100644 --- a/tests/baselines/reference/functionCall17.errors.txt +++ b/tests/baselines/reference/functionCall17.errors.txt @@ -2,16 +2,16 @@ function foo(a:string, b?:string, c?:number, ...d:number[]){} foo('foo', 1); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo'); foo(); ~~~~~ !!! Supplied parameters do not match any signature of call target. foo(1, 'bar'); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 1, 3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar', 3, 4); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall6.errors.txt b/tests/baselines/reference/functionCall6.errors.txt index 33aff81bf1e..c871e15d30a 100644 --- a/tests/baselines/reference/functionCall6.errors.txt +++ b/tests/baselines/reference/functionCall6.errors.txt @@ -3,7 +3,7 @@ foo('bar'); foo(2); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo('foo', 'bar'); ~~~~~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/functionCall7.errors.txt b/tests/baselines/reference/functionCall7.errors.txt index 91f40d6d4ae..d41add08dd3 100644 --- a/tests/baselines/reference/functionCall7.errors.txt +++ b/tests/baselines/reference/functionCall7.errors.txt @@ -8,7 +8,7 @@ !!! Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument type 'number' is not assignable to parameter type 'c1'. +!!! Argument of type 'number' is not assignable to parameter of type 'c1'. foo(); ~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/functionCall8.errors.txt b/tests/baselines/reference/functionCall8.errors.txt index 1f68ed7f3c1..85eee804724 100644 --- a/tests/baselines/reference/functionCall8.errors.txt +++ b/tests/baselines/reference/functionCall8.errors.txt @@ -6,6 +6,6 @@ !!! Supplied parameters do not match any signature of call target. foo(4); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. foo(); \ No newline at end of file diff --git a/tests/baselines/reference/functionCall9.errors.txt b/tests/baselines/reference/functionCall9.errors.txt index 20bc66997a5..5feb59f77c6 100644 --- a/tests/baselines/reference/functionCall9.errors.txt +++ b/tests/baselines/reference/functionCall9.errors.txt @@ -4,7 +4,7 @@ foo('foo'); foo('foo','bar'); ~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. foo('foo', 1, 'bar'); ~~~~~~~~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index ce5e5782c31..3fb2b84fed5 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -5,7 +5,7 @@ foo(1); ~ -!!! Argument type 'number' is not assignable to parameter type 'Function'. +!!! Argument of type 'number' is not assignable to parameter of type 'Function'. foo(() => { }, 1); ~~~~~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. @@ -29,41 +29,41 @@ var r = foo2(new Function()); ~~~~~~~~~~~~~~ -!!! Argument type 'Function' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. var r2 = foo2((x: string[]) => x); ~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string[]) => string[]' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. var r6 = foo2(C); ~ -!!! Argument type 'typeof C' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. var r7 = foo2(b); ~ -!!! Argument type 'new (x: string) => string' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: U, y: V) => U' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. var r13 = foo2(C2); ~~ -!!! Argument type 'typeof C2' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. var r14 = foo2(b2); ~~ -!!! Argument type 'new (x: T) => T' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); ~~ -!!! Argument type 'F2' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. function fff(x: T, y: U) { ~~~~~~~~~~~ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. foo2(x); ~ -!!! Argument type 'T' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. foo2(y); ~ -!!! Argument type 'U' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type 'U' is not assignable to parameter of type '(x: string) => string'. } \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads.errors.txt b/tests/baselines/reference/functionOverloads.errors.txt index c48ca25ca78..1b2e20e5a8d 100644 --- a/tests/baselines/reference/functionOverloads.errors.txt +++ b/tests/baselines/reference/functionOverloads.errors.txt @@ -4,4 +4,4 @@ function foo(bar?: string): any { return "" }; var x = foo(5); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. \ No newline at end of file +!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads2.errors.txt b/tests/baselines/reference/functionOverloads2.errors.txt index 4555aa8786d..c0023ab9dcd 100644 --- a/tests/baselines/reference/functionOverloads2.errors.txt +++ b/tests/baselines/reference/functionOverloads2.errors.txt @@ -4,4 +4,4 @@ function foo(bar: any): any { return bar }; var x = foo(true); ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'number'. \ No newline at end of file +!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads27.errors.txt b/tests/baselines/reference/functionOverloads27.errors.txt index f42618b0c84..35216e2fe42 100644 --- a/tests/baselines/reference/functionOverloads27.errors.txt +++ b/tests/baselines/reference/functionOverloads27.errors.txt @@ -4,5 +4,5 @@ function foo(bar?:any):any{ return '' } var x = foo(5); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index db77e125ca8..94e9ccc9ab2 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -4,7 +4,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'bar'}]); ~~~~~~~~~~~ -!!! Argument type '{ a: string; }[]' is not assignable to parameter type '{ a: boolean; }[]'. +!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. !!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': !!! Types of property 'a' are incompatible: !!! Type 'string' is not assignable to type 'boolean'. diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index 833c16b935e..5d84364f8d2 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -4,7 +4,7 @@ function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~~~ -!!! Argument type '{}[]' is not assignable to parameter type '{ a: boolean; }[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type '{ a: boolean; }[]'. !!! Type '{}' is not assignable to type '{ a: boolean; }': !!! Property 'a' is missing in type '{}'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt index 238c5cde6fb..6d829215cd2 100644 --- a/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt +++ b/tests/baselines/reference/genericCallWithConstraintsTypeArgumentInference2.errors.txt @@ -13,5 +13,5 @@ var r3 = foo(new Object()); // {} var r4 = foo(1); // error ~ -!!! Argument type 'number' is not assignable to parameter type 'Date'. +!!! Argument of type 'number' is not assignable to parameter of type 'Date'. var r5 = foo(new Date()); // no error \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt index dd352e1fd74..c92110911ab 100644 --- a/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithConstructorTypedArguments5.errors.txt @@ -11,11 +11,11 @@ var arg2: { cb: new (x: T, y: T) => string }; var r2 = foo(arg2); // error ~~~~ -!!! Argument type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter type '{ cb: new (t: any) => string; }'. +!!! Argument of type '{ cb: new (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: new (t: any) => string; }'. var arg3: { cb: new (x: string, y: number) => string }; var r3 = foo(arg3); // error ~~~~ -!!! Argument type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter type '{ cb: new (t: string) => string; }'. +!!! Argument of type '{ cb: new (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: new (t: string) => string; }'. function foo2(arg: { cb: new(t: T, t2: T) => U }) { return new arg.cb(null, null); diff --git a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt index 9592e64c9f4..c185756667a 100644 --- a/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt +++ b/tests/baselines/reference/genericCallWithFunctionTypedArguments5.errors.txt @@ -10,12 +10,12 @@ // more args not allowed var r2 = foo({ cb: (x: T, y: T) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter type '{ cb: (t: any) => string; }'. +!!! Argument of type '{ cb: (x: T, y: T) => string; }' is not assignable to parameter of type '{ cb: (t: any) => string; }'. !!! Types of property 'cb' are incompatible: !!! Type '(x: T, y: T) => string' is not assignable to type '(t: any) => string'. var r3 = foo({ cb: (x: string, y: number) => '' }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter type '{ cb: (t: string) => string; }'. +!!! Argument of type '{ cb: (x: string, y: number) => string; }' is not assignable to parameter of type '{ cb: (t: string) => string; }'. !!! Types of property 'cb' are incompatible: !!! Type '(x: string, y: number) => string' is not assignable to type '(t: string) => string'. diff --git a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt index 459d54091dc..9396e3f2de9 100644 --- a/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithGenericSignatureArguments2.errors.txt @@ -14,10 +14,10 @@ // BUG 835518 var r9 = r7(new Date()); // should be ok ~~~~~~~~~~ -!!! Argument type 'Date' is not assignable to parameter type 'T'. +!!! Argument of type 'Date' is not assignable to parameter of type 'T'. var r10 = r7(1); // error ~ -!!! Argument type 'number' is not assignable to parameter type 'T'. +!!! Argument of type 'number' is not assignable to parameter of type 'T'. } function foo2(a: (x: T) => T, b: (x: T) => T) { @@ -28,7 +28,7 @@ function other3(x: T) { var r7 = foo2((a: T) => a, (b: T) => b); // error ~~~~~~~~~~~ -!!! Argument type '(a: T) => T' is not assignable to parameter type '(x: Date) => Date'. +!!! Argument of type '(a: T) => T' is not assignable to parameter of type '(x: Date) => Date'. var r7b = foo2((a) => a, (b) => b); // valid, T is inferred to be Date } @@ -42,4 +42,4 @@ var r7 = foo3(E.A, (x) => E.A, (x) => F.A); // error ~~~~~~~~~~ -!!! Argument type '(x: E) => F' is not assignable to parameter type '(x: E) => E'. \ No newline at end of file +!!! Argument of type '(x: E) => F' is not assignable to parameter of type '(x: E) => E'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt index de06844fff4..9551a712b75 100644 --- a/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectLiteralArguments1.errors.txt @@ -4,21 +4,21 @@ // these are all errors var x2 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument type '{ x: number; y: string; }' is not assignable to parameter type '{ x: number; y: number; }'. +!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: number; y: number; }'. !!! Types of property 'y' are incompatible: !!! Type 'string' is not assignable to type 'number'. var x3 = foo({ x: 3, y: "" }, 4); ~~~~~~~~~~~~~~~ -!!! Argument type '{ x: number; y: string; }' is not assignable to parameter type '{ x: string; y: string; }'. +!!! Argument of type '{ x: number; y: string; }' is not assignable to parameter of type '{ x: string; y: string; }'. !!! Types of property 'x' are incompatible: !!! Type 'number' is not assignable to type 'string'. var x4 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument type '{ x: string; y: number; }' is not assignable to parameter type '{ x: number; y: number; }'. +!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: number; y: number; }'. !!! Types of property 'x' are incompatible: !!! Type 'string' is not assignable to type 'number'. var x5 = foo({ x: "", y: 4 }, ""); ~~~~~~~~~~~~~~~ -!!! Argument type '{ x: string; y: number; }' is not assignable to parameter type '{ x: string; y: string; }'. +!!! Argument of type '{ x: string; y: number; }' is not assignable to parameter of type '{ x: string; y: string; }'. !!! Types of property 'y' are incompatible: !!! Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt index f597b07dfa5..4d306264e7d 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints4.errors.txt @@ -34,7 +34,7 @@ var r4 = foo(c, d); var r5 = foo(c, d); // error ~ -!!! Argument type 'C' is not assignable to parameter type 'T'. +!!! Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt index 960ebfef563..1b619f5ce7a 100644 --- a/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt +++ b/tests/baselines/reference/genericCallWithObjectTypeArgsAndConstraints5.errors.txt @@ -26,6 +26,6 @@ !!! Constraint of a type parameter cannot reference any type parameter from the same type parameter list. var r5 = foo(c, d); // error ~ -!!! Argument type 'C' is not assignable to parameter type 'T'. +!!! Argument of type 'C' is not assignable to parameter of type 'T'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt index 90e90598083..04756285abf 100644 --- a/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedConstructorTypedArguments2.errors.txt @@ -31,7 +31,7 @@ var b: { new (x: T, y: T): string }; var r10 = foo6(b); // error ~ -!!! Argument type 'new (x: T, y: T) => string' is not assignable to parameter type '{ new (x: any): string; new (x: any, y?: any): string; }'. +!!! Argument of type 'new (x: T, y: T) => string' is not assignable to parameter of type '{ new (x: any): string; new (x: any, y?: any): string; }'. function foo7(x:T, cb: { new(x: T): string; new(x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt index d01a15f47c4..7028f0cf38e 100644 --- a/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt +++ b/tests/baselines/reference/genericCallWithOverloadedFunctionTypedArguments2.errors.txt @@ -28,7 +28,7 @@ var r10 = foo6((x: T, y: T) => ''); // error ~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: T, y: T) => string' is not assignable to parameter type '{ (x: any): string; (x: any, y?: any): string; }'. +!!! Argument of type '(x: T, y: T) => string' is not assignable to parameter of type '{ (x: any): string; (x: any, y?: any): string; }'. function foo7(x:T, cb: { (x: T): string; (x: T, y?: T): string }) { return cb; diff --git a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt index 04942c35b8c..ca5fd616422 100644 --- a/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt +++ b/tests/baselines/reference/genericCallbackInvokedInsideItsContainingFunction1.errors.txt @@ -5,7 +5,7 @@ !!! Supplied parameters do not match any signature of call target. var r2 = f(1); ~ -!!! Argument type 'number' is not assignable to parameter type 'T'. +!!! Argument of type 'number' is not assignable to parameter of type 'T'. var r3 = f(null); ~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. @@ -22,7 +22,7 @@ var r12 = f(y); ~ -!!! Argument type 'U' is not assignable to parameter type 'T'. +!!! Argument of type 'U' is not assignable to parameter of type 'T'. var r22 = f(y); ~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/genericCombinators2.errors.txt b/tests/baselines/reference/genericCombinators2.errors.txt index a38b32745e7..aad1732547a 100644 --- a/tests/baselines/reference/genericCombinators2.errors.txt +++ b/tests/baselines/reference/genericCombinators2.errors.txt @@ -15,7 +15,7 @@ var rf1 = (x: number, y: string) => { return x.toFixed() }; var r5a = _.map(c2, (x, y) => { return x.toFixed() }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y: string) => string' is not assignable to parameter type '(x: number, y: string) => Date'. +!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. var r5b = _.map(c2, rf1); ~~~ -!!! Argument type '(x: number, y: string) => string' is not assignable to parameter type '(x: number, y: string) => Date'. \ No newline at end of file +!!! Argument of type '(x: number, y: string) => string' is not assignable to parameter of type '(x: number, y: string) => Date'. \ No newline at end of file diff --git a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt index 96d1a4efc51..8b3673de74b 100644 --- a/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt +++ b/tests/baselines/reference/genericConstraintSatisfaction1.errors.txt @@ -6,7 +6,7 @@ var x: I<{s: string}> x.f({s: 1}) ~~~~~~ -!!! Argument type '{ s: number; }' is not assignable to parameter type '{ s: string; }'. +!!! Argument of type '{ s: number; }' is not assignable to parameter of type '{ s: string; }'. !!! Types of property 's' are incompatible: !!! Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/genericNewInterface.errors.txt b/tests/baselines/reference/genericNewInterface.errors.txt index 87b6854dba8..a8574f19eb5 100644 --- a/tests/baselines/reference/genericNewInterface.errors.txt +++ b/tests/baselines/reference/genericNewInterface.errors.txt @@ -2,7 +2,7 @@ function createInstance(ctor: new (s: string) => T): T { return new ctor(42); //should be an error ~~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. } interface INewable { @@ -12,5 +12,5 @@ function createInstance2(ctor: INewable): T { return new ctor(1024); //should be an error ~~~~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArgs.errors.txt b/tests/baselines/reference/genericRestArgs.errors.txt index a70c28d4b35..a23bec39f0e 100644 --- a/tests/baselines/reference/genericRestArgs.errors.txt +++ b/tests/baselines/reference/genericRestArgs.errors.txt @@ -5,7 +5,7 @@ var a1Gc = makeArrayG(1, ""); var a1Gd = makeArrayG(1, ""); // error ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. function makeArrayGOpt(item1?: T, item2?: T, item3?: T) { return [item1, item2, item3]; @@ -14,4 +14,4 @@ var a2Gb = makeArrayG(1, ""); var a2Gc = makeArrayG(1, ""); // error ~ -!!! Argument type 'number' is not assignable to parameter type 'any[]'. \ No newline at end of file +!!! Argument of type 'number' is not assignable to parameter of type 'any[]'. \ No newline at end of file diff --git a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt index 1a3f24f3944..98b077e1a77 100644 --- a/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt +++ b/tests/baselines/reference/genericWithOpenTypeParameters1.errors.txt @@ -7,7 +7,7 @@ x.foo(1); // no error var f = (x: B) => { return x.foo(1); } // error ~ -!!! Argument type 'number' is not assignable to parameter type 'T'. +!!! Argument of type 'number' is not assignable to parameter of type 'T'. var f2 = (x: B) => { return x.foo(1); } // error ~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index ff3bcbe6836..0eaf7593c56 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt @@ -9,7 +9,7 @@ this.test([]); this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'string[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'string[]'. !!! Type '{}' is not assignable to type 'string'. } } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index bafecbe4b94..bac9dbabf1f 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -62,7 +62,7 @@ var c2: C2; if1(c1); ~~ -!!! Argument type 'C1' is not assignable to parameter type 'IFoo2'. +!!! Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. function of1(n: { a: { a: string; }; b: string; }): number; @@ -71,7 +71,7 @@ of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~ -!!! Argument type '{ e: number; f: number; }' is not assignable to parameter type '{ c: { b: string; }; d: string; }'. +!!! Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. !!! Property 'c' is missing in type '{ e: number; f: number; }'. interface IMap { diff --git a/tests/baselines/reference/indexSignatureTypeInference.errors.txt b/tests/baselines/reference/indexSignatureTypeInference.errors.txt index 8312c110a76..a37e4458543 100644 --- a/tests/baselines/reference/indexSignatureTypeInference.errors.txt +++ b/tests/baselines/reference/indexSignatureTypeInference.errors.txt @@ -18,6 +18,6 @@ var v1 = numberMapToArray(stringMap); // Ok var v1 = stringMapToArray(numberMap); // Error expected here ~~~~~~~~~ -!!! Argument type 'NumberMap' is not assignable to parameter type 'StringMap<{}>'. +!!! Argument of type 'NumberMap' is not assignable to parameter of type 'StringMap<{}>'. var v1 = stringMapToArray(stringMap); // Ok \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt index 6b002955657..7a1dcbe5a55 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams.errors.txt @@ -13,7 +13,7 @@ // Errors new Derived("", 3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new Derived(3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. \ No newline at end of file +!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt index 6ec3a70cf57..c26643584c8 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt @@ -32,10 +32,10 @@ // Errors new Derived(3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", 3); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new Derived("", 3, "", ""); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. \ No newline at end of file +!!! Argument of type 'number' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt index 60949fb6650..663cb9a56ca 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.errors.txt +++ b/tests/baselines/reference/interfaceAssignmentCompat.errors.txt @@ -32,7 +32,7 @@ x=x.sort(CompareYeux); // parameter mismatch ~~~~~~~~~~~ -!!! Argument type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter type '(a: IEye, b: IEye) => number'. +!!! Argument of type '(a: IFrenchEye, b: IFrenchEye) => number' is not assignable to parameter of type '(a: IEye, b: IEye) => number'. // type of z inferred from specialized array type var z=x.sort(CompareEyes); // ok diff --git a/tests/baselines/reference/invocationExpressionInFunctionParameter.errors.txt b/tests/baselines/reference/invocationExpressionInFunctionParameter.errors.txt index 698d98c4a04..6b7e8309ca7 100644 --- a/tests/baselines/reference/invocationExpressionInFunctionParameter.errors.txt +++ b/tests/baselines/reference/invocationExpressionInFunctionParameter.errors.txt @@ -3,5 +3,5 @@ } function foo3(x = foo1(123)) { //should error, 123 is not string ~~~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/lambdaArgCrash.errors.txt b/tests/baselines/reference/lambdaArgCrash.errors.txt index 423bc86c1dd..46594d8abe7 100644 --- a/tests/baselines/reference/lambdaArgCrash.errors.txt +++ b/tests/baselines/reference/lambdaArgCrash.errors.txt @@ -31,7 +31,7 @@ super.add(listener); ~~~~~~~~ -!!! Argument type '(items: unknown) => void' is not assignable to parameter type '() => any'. +!!! Argument of type '(items: unknown) => void' is not assignable to parameter of type '() => any'. } diff --git a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt index 4e44ef6ea3d..206a12bf885 100644 --- a/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt +++ b/tests/baselines/reference/lastPropertyInLiteralWins.errors.txt @@ -22,7 +22,7 @@ !!! Duplicate identifier 'thunk'. }); ~ -!!! Argument type '{ thunk: (num: number) => void; }' is not assignable to parameter type 'Thing'. +!!! Argument of type '{ thunk: (num: number) => void; }' is not assignable to parameter of type 'Thing'. !!! Types of property 'thunk' are incompatible: !!! Type '(num: number) => void' is not assignable to type '(str: string) => void': !!! Types of parameters 'num' and 'str' are incompatible: diff --git a/tests/baselines/reference/maxConstraints.errors.txt b/tests/baselines/reference/maxConstraints.errors.txt index bfcdf2fdfec..8a525d1a673 100644 --- a/tests/baselines/reference/maxConstraints.errors.txt +++ b/tests/baselines/reference/maxConstraints.errors.txt @@ -10,4 +10,4 @@ var max2: Comparer = (x, y) => { return (x.compareTo(y) > 0) ? x : y }; var maxResult = max2(1, 2); ~ -!!! Argument type 'number' is not assignable to parameter type 'Comparable'. \ No newline at end of file +!!! Argument of type 'number' is not assignable to parameter of type 'Comparable'. \ No newline at end of file diff --git a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt index f42e13c5028..6e2647bc45d 100644 --- a/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt +++ b/tests/baselines/reference/mismatchedExplicitTypeParameterAndArgumentType.errors.txt @@ -10,7 +10,7 @@ var r6 = map([1, ""], (x) => x.toString()); var r7 = map([1, ""], (x) => x.toString()); // error ~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'number[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. !!! Type '{}' is not assignable to type 'number'. var r7b = map([1, ""], (x) => x.toString()); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/noErrorsInCallback.errors.txt b/tests/baselines/reference/noErrorsInCallback.errors.txt index 435037dd86e..cd7c4beb645 100644 --- a/tests/baselines/reference/noErrorsInCallback.errors.txt +++ b/tests/baselines/reference/noErrorsInCallback.errors.txt @@ -4,10 +4,10 @@ } var one = new Bar({}); // Error ~~ -!!! Argument type '{}' is not assignable to parameter type 'string'. +!!! Argument of type '{}' is not assignable to parameter of type 'string'. [].forEach(() => { var two = new Bar({}); // No error? ~~ -!!! Argument type '{}' is not assignable to parameter type 'string'. +!!! Argument of type '{}' is not assignable to parameter of type 'string'. }); \ No newline at end of file diff --git a/tests/baselines/reference/numberToString.errors.txt b/tests/baselines/reference/numberToString.errors.txt index 08d9ac9e925..5d7a636f5f1 100644 --- a/tests/baselines/reference/numberToString.errors.txt +++ b/tests/baselines/reference/numberToString.errors.txt @@ -11,6 +11,6 @@ f1(3); f2(3); // error no coercion to string ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. f2(3+""); // ok + operator promotes \ No newline at end of file diff --git a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt index eaf66f044c0..6b3788ff53e 100644 --- a/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt +++ b/tests/baselines/reference/objectCreationExpressionInFunctionParameter.errors.txt @@ -5,7 +5,7 @@ } function foo(x = new A(123)) { //should error, 123 is not string ~~~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. }} ~ !!! Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt index a1772f4b839..2d12916ab24 100644 --- a/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt +++ b/tests/baselines/reference/objectLitTargetTypeCallSite.errors.txt @@ -5,6 +5,6 @@ process({a:true,b:"y"}); ~~~~~~~~~~~~~~ -!!! Argument type '{ a: boolean; b: string; }' is not assignable to parameter type '{ a: number; b: string; }'. +!!! Argument of type '{ a: boolean; b: string; }' is not assignable to parameter of type '{ a: number; b: string; }'. !!! Types of property 'a' are incompatible: !!! Type 'boolean' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt index c803d071610..f4eef960bb9 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping.errors.txt @@ -8,17 +8,17 @@ f2({ hello: 1 }) // error ~~~~~~~~~~~~ -!!! Argument type '{ hello: number; }' is not assignable to parameter type 'I'. +!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I'. !!! Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) // missing toString satisfied by Object's member f2({ value: '', what: 1 }) // missing toString satisfied by Object's member f2({ toString: (s) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ toString: (s: string) => string; }' is not assignable to parameter type 'I'. +!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. !!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ toString: (s: string) => s }) // error, missing property value from ArgsString ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ toString: (s: string) => string; }' is not assignable to parameter type 'I'. +!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'. !!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) // error ~~~~ diff --git a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt index 87cc45f3cac..3b6995e0623 100644 --- a/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt +++ b/tests/baselines/reference/objectLiteralFunctionArgContextualTyping2.errors.txt @@ -8,25 +8,25 @@ f2({ hello: 1 }) ~~~~~~~~~~~~ -!!! Argument type '{ hello: number; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'. !!! Property 'value' is missing in type '{ hello: number; }'. f2({ value: '' }) ~~~~~~~~~~~~~ -!!! Argument type '{ value: string; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'. !!! Property 'doStuff' is missing in type '{ value: string; }'. f2({ value: '', what: 1 }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ value: string; what: number; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'. !!! Property 'doStuff' is missing in type '{ value: string; what: number; }'. f2({ toString: (s) => s }) ~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ toString: (s: any) => any; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. !!! Property 'value' is missing in type '{ toString: (s: any) => any; }'. f2({ toString: (s: string) => s }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ toString: (s: string) => string; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'. !!! Property 'value' is missing in type '{ toString: (s: string) => string; }'. f2({ value: '', toString: (s) => s.uhhh }) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter type 'I2'. +!!! Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'. !!! Property 'doStuff' is missing in type '{ value: string; toString: (s: any) => any; }'. \ No newline at end of file diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index 998658d2b2d..415a44ebae5 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -44,7 +44,7 @@ !!! Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. z=x.h("hello",0); // good var v=x.g; diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt index 47ba1a4bd17..ad3dc56a7f9 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation.errors.txt @@ -13,7 +13,7 @@ cb('uh'); cb(1); // error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. } var cb: (number) => number = (x: number) => 1; diff --git a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt index 45fbc739dc6..201165a56ec 100644 --- a/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt +++ b/tests/baselines/reference/overloadOnConstNoAnyImplementation2.errors.txt @@ -16,7 +16,7 @@ callback(hm); callback(1); // error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. } } diff --git a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt index 08442761514..1369843e9b4 100644 --- a/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt +++ b/tests/baselines/reference/overloadOnConstantsInvalidOverload1.errors.txt @@ -17,4 +17,4 @@ foo("HI"); ~~~~ -!!! Argument type 'string' is not assignable to parameter type '"SPAN"'. \ No newline at end of file +!!! Argument of type 'string' is not assignable to parameter of type '"SPAN"'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolution.errors.txt b/tests/baselines/reference/overloadResolution.errors.txt index 34c24a00610..a5d0a02969d 100644 --- a/tests/baselines/reference/overloadResolution.errors.txt +++ b/tests/baselines/reference/overloadResolution.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found fn1({}); // Error ~~ -!!! Argument type '{}' is not assignable to parameter type 'number'. +!!! Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments function fn2(s: string, n: number): number; @@ -43,7 +43,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments fn2('', 0); // Error ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments fn2('', 0); // OK @@ -80,14 +80,14 @@ ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. fn4('', 3); // Error ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. ~~~~~~ !!! Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. fn4(3, ''); ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. @@ -110,10 +110,10 @@ // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'number'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. fn4(null, true); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'string'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(f: (n: string) => void): string; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt index e91ef3325be..389ae265c32 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument type '{}' is not assignable to parameter type 'number'. +!!! Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments class fn2 { @@ -81,14 +81,14 @@ new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. ~~~~~~ !!! Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); // Error ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. @@ -99,10 +99,10 @@ new fn4('', 3); new fn4(3, ''); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new fn4(3, undefined); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', null); // Generic overloads with constraints called with type arguments that do not satisfy the constraints @@ -115,10 +115,10 @@ // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'string'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. new fn4(null, true); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'number'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. // Non - generic overloads where contextual typing of function arguments has errors class fn5 { diff --git a/tests/baselines/reference/overloadResolutionConstructors.errors.txt b/tests/baselines/reference/overloadResolutionConstructors.errors.txt index 3a7c3eb29bf..96dd65c0710 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionConstructors.errors.txt @@ -27,7 +27,7 @@ // No candidate overloads found new fn1({}); // Error ~~ -!!! Argument type '{}' is not assignable to parameter type 'number'. +!!! Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments interface fn2 { @@ -45,7 +45,7 @@ // Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments new fn2('', 0); // Error ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. // Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments new fn2('', 0); // OK @@ -87,14 +87,14 @@ ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new fn4('', 3); // Error ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. ~~~~~~ !!! Type 'string' does not satisfy the constraint 'number'. ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. new fn4(3, ''); ~~~~~~ !!! Type 'number' does not satisfy the constraint 'string'. @@ -117,10 +117,10 @@ // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'number'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'number'. new fn4(null, true); // Error ~~~~ -!!! Argument type 'boolean' is not assignable to parameter type 'string'. +!!! Argument of type 'boolean' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors interface fn5 { diff --git a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt index 8a9f02b6806..bd11102dfdd 100644 --- a/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt +++ b/tests/baselines/reference/overloadResolutionOverCTLambda.errors.txt @@ -2,4 +2,4 @@ function foo(b: (item: number) => boolean) { } foo(a => a); // can not convert (number)=>bool to (number)=>number ~~~~~~ -!!! Argument type '(a: number) => number' is not assignable to parameter type '(item: number) => boolean'. \ No newline at end of file +!!! Argument of type '(a: number) => number' is not assignable to parameter of type '(item: number) => boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index 9fd11bb07fb..c8b65902d26 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -8,7 +8,7 @@ var x11 = foo([{a:0}]); // works var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~ -!!! Argument type '{ a: string; }[]' is not assignable to parameter type '{ a: boolean; }[]'. +!!! Argument of type '{ a: string; }[]' is not assignable to parameter of type '{ a: boolean; }[]'. !!! Type '{ a: string; }' is not assignable to type '{ a: boolean; }': !!! Types of property 'a' are incompatible: !!! Type 'string' is not assignable to type 'boolean'. @@ -24,7 +24,7 @@ var x3 = foo2({a:true}); // works var x4 = foo2({a:"s"}); // error ~~~~~~~ -!!! Argument type '{ a: string; }' is not assignable to parameter type '{ a: boolean; }'. +!!! Argument of type '{ a: string; }' is not assignable to parameter of type '{ a: boolean; }'. !!! Types of property 'a' are incompatible: !!! Type 'string' is not assignable to type 'boolean'. @@ -34,6 +34,6 @@ function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error ~~~~~~~~ -!!! Argument type '{ a: boolean; }' is not assignable to parameter type '{ a: string; }'. +!!! Argument of type '{ a: boolean; }' is not assignable to parameter of type '{ a: string; }'. !!! Types of property 'a' are incompatible: !!! Type 'boolean' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadingOnConstants2.errors.txt b/tests/baselines/reference/overloadingOnConstants2.errors.txt index afc93167c75..a79428f70b6 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -19,7 +19,7 @@ var b: E = foo("bye", []); // E var c = foo("um", []); // error ~~~~ -!!! Argument type 'string' is not assignable to parameter type '"bye"'. +!!! Argument of type 'string' is not assignable to parameter of type '"bye"'. //function bar(x: "hi", items: string[]): D; diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index e7215c70250..58472a41414 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -16,11 +16,11 @@ ~~~~~~ !!! Type 'string' is not assignable to type 'number'. ~ -!!! Argument type 'D' is not assignable to parameter type 'A'. +!!! Argument of type 'D' is not assignable to parameter of type 'A'. var result2: number = foo(x => new G(x)); // No error, returns number ~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: D) => G' is not assignable to parameter type '(x: B) => any'. +!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. ~~~~~~~~ !!! Type 'D' does not satisfy the constraint 'A'. @@ -34,5 +34,5 @@ ~~~~~~~~~~~~~ }); ~ -!!! Argument type '(x: D) => G' is not assignable to parameter type '(x: B) => any'. +!!! Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 13f3a808374..2e44fc1df69 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -6,12 +6,12 @@ func(s => ({})); // Error for no applicable overload (object type is missing a and b) ~~~~~~~~~ -!!! Argument type '(s: string) => {}' is not assignable to parameter type '(s: string) => { a: number; b: number; }'. +!!! Argument of type '(s: string) => {}' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. func(s => ({ a: blah, b: 3 })); // Only error inside the function, but not outside (since it would be applicable if not for the provisional error) ~~~~ !!! Cannot find name 'blah'. func(s => ({ a: blah })); // Two errors here, one for blah not being defined, and one for the overload since it would not be applicable anyway ~~~~~~~~~~~~~~~~~~ -!!! Argument type '(s: string) => { a: unknown; }' is not assignable to parameter type '(s: string) => { a: number; b: number; }'. +!!! Argument of type '(s: string) => { a: unknown; }' is not assignable to parameter of type '(s: string) => { a: number; b: number; }'. ~~~~ !!! Cannot find name 'blah'. \ No newline at end of file diff --git a/tests/baselines/reference/parser536727.errors.txt b/tests/baselines/reference/parser536727.errors.txt index b17d0a837e0..3404c52f536 100644 --- a/tests/baselines/reference/parser536727.errors.txt +++ b/tests/baselines/reference/parser536727.errors.txt @@ -7,8 +7,8 @@ foo(g); foo(() => g); ~~~~~~~ -!!! Argument type '() => (x: string) => string' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'. foo(x); ~ -!!! Argument type '() => (x: string) => string' is not assignable to parameter type '(x: string) => string'. +!!! Argument of type '() => (x: string) => string' is not assignable to parameter of type '(x: string) => string'. \ No newline at end of file diff --git a/tests/baselines/reference/primitiveConstraints2.errors.txt b/tests/baselines/reference/primitiveConstraints2.errors.txt index ac0bdcb73ae..c35877b1e26 100644 --- a/tests/baselines/reference/primitiveConstraints2.errors.txt +++ b/tests/baselines/reference/primitiveConstraints2.errors.txt @@ -8,7 +8,7 @@ var x = new C(); x.bar2(2, ""); // should error ~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. +!!! Argument of type 'string' is not assignable to parameter of type 'number'. x.bar2(2, ""); // should error ~~~~~~ !!! Type 'string' does not satisfy the constraint 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining1.errors.txt b/tests/baselines/reference/promiseChaining1.errors.txt index 0f41f2db72f..3f58540aec6 100644 --- a/tests/baselines/reference/promiseChaining1.errors.txt +++ b/tests/baselines/reference/promiseChaining1.errors.txt @@ -7,7 +7,7 @@ // should get a fresh type parameter which each then call var z = this.then(x => result)/*S*/.then(x => "abc")/*Function*/.then(x => x.length)/*number*/; // Should error on "abc" because it is not a Function ~~~~~~~~~~ -!!! Argument type '(x: S) => string' is not assignable to parameter type '(x: S) => Function'. +!!! Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promiseChaining2.errors.txt b/tests/baselines/reference/promiseChaining2.errors.txt index 19bd7303948..62a12242558 100644 --- a/tests/baselines/reference/promiseChaining2.errors.txt +++ b/tests/baselines/reference/promiseChaining2.errors.txt @@ -7,7 +7,7 @@ // should get a fresh type parameter which each then call var z = this.then(x => result).then(x => "abc").then(x => x.length); ~~~~~~~~~~ -!!! Argument type '(x: S) => string' is not assignable to parameter type '(x: S) => Function'. +!!! Argument of type '(x: S) => string' is not assignable to parameter of type '(x: S) => Function'. return new Chain2(result); } } \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index 9b92ee45cbf..0855b7f0f4d 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -79,69 +79,69 @@ var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -149,24 +149,24 @@ var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok @@ -174,13 +174,13 @@ var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // ok @@ -206,7 +206,7 @@ var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index cc3239c2908..18a7a6a21d5 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -73,76 +73,76 @@ var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // Should error ~~~~~~~~~~~~~ -!!! Argument type '(x: number) => IPromise' is not assignable to parameter type '(value: IPromise) => IPromise'. +!!! Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. var r4: IPromise; var sIPromise: (x: any) => IPromise; var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -150,24 +150,24 @@ var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok @@ -175,13 +175,13 @@ var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // ok @@ -207,13 +207,13 @@ var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok ~~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 1b7a454c32a..ca2ad6fc950 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -68,7 +68,7 @@ var r3a = r3.then(testFunction3, testFunction3, testFunction3); var r3b = r3.then(testFunction3, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ~~~~~~~~~~~~~ -!!! Argument type '(x: number) => IPromise' is not assignable to parameter type '(value: IPromise) => IPromise'. +!!! Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. var s3: Promise; var s3a = s3.then(testFunction3, testFunction3, testFunction3); var s3b = s3.then(testFunction3P, testFunction3P, testFunction3P); @@ -80,69 +80,69 @@ var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, y?: string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => Promise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! Argument type '(cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: string) => IPromise'. +!!! Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -150,24 +150,24 @@ var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok @@ -175,13 +175,13 @@ var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => Promise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! Argument type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // ok @@ -205,11 +205,11 @@ var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! Argument type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter type '(value: number) => IPromise'. +!!! Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // ok var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // ok @@ -219,5 +219,5 @@ var s12a = s12.then(testFunction12, testFunction12, testFunction12); // ok var s12b = s12.then(testFunction12P, testFunction12P, testFunction12P); // ok ~~~~~~~~~~~~~~~ -!!! Argument type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter type '(value: (x: any) => any) => Promise'. +!!! Argument of type '{ (x: T): IPromise; (x: T, y: T): Promise; }' is not assignable to parameter of type '(value: (x: any) => any) => Promise'. var s12c = s12.then(testFunction12P, testFunction12, testFunction12); // ok \ No newline at end of file diff --git a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt index 165783f79bc..72d7bfd402e 100644 --- a/tests/baselines/reference/recursiveClassReferenceTest.errors.txt +++ b/tests/baselines/reference/recursiveClassReferenceTest.errors.txt @@ -101,7 +101,7 @@ public getInitialState(): IState { return new State(self); ~~~~ -!!! Argument type 'Window' is not assignable to parameter type 'IMode'. +!!! Argument of type 'Window' is not assignable to parameter of type 'IMode'. } diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index 802c8bbbcaa..5068438a8ca 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -35,7 +35,7 @@ } C.g(3); // error ~ -!!! Argument type 'number' is not assignable to parameter type '(t: typeof g) => void'. +!!! Argument of type 'number' is not assignable to parameter of type '(t: typeof g) => void'. var f4: () => typeof f4; f4 = 3; // error @@ -53,7 +53,7 @@ !!! Supplied parameters do not match any signature of call target. f6(""); // ok (function takes an any param) ~~ -!!! Argument type 'string' is not assignable to parameter type '{ (): typeof f6; (a: typeof f6): () => number; }'. +!!! Argument of type 'string' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. f6(); // ok declare function f7(): typeof f7; @@ -66,5 +66,5 @@ !!! Supplied parameters do not match any signature of call target. f7(""); // ok (function takes an any param) ~~ -!!! Argument type 'string' is not assignable to parameter type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. +!!! Argument of type 'string' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. f7(); // ok \ No newline at end of file diff --git a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt index 385bcaa3271..76b86daf358 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -7,9 +7,9 @@ // both are errors x3(1, (x: string) => 1); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. x3(1, (x: 'hm') => 1); ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. ~~~~~~~~~~~~~~ !!! A signature with an implementation cannot use a string literal type. \ No newline at end of file diff --git a/tests/baselines/reference/stringPropertyAccessWithError.errors.txt b/tests/baselines/reference/stringPropertyAccessWithError.errors.txt index 645eeee7b2f..d3a370d1a51 100644 --- a/tests/baselines/reference/stringPropertyAccessWithError.errors.txt +++ b/tests/baselines/reference/stringPropertyAccessWithError.errors.txt @@ -2,4 +2,4 @@ var x = ''; var d = x['charAt']('invalid'); // error ~~~~~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'number'. \ No newline at end of file +!!! Argument of type 'string' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/subtypingWithCallSignaturesA.errors.txt b/tests/baselines/reference/subtypingWithCallSignaturesA.errors.txt index fe64aee3d41..541b9a6fd7d 100644 --- a/tests/baselines/reference/subtypingWithCallSignaturesA.errors.txt +++ b/tests/baselines/reference/subtypingWithCallSignaturesA.errors.txt @@ -2,4 +2,4 @@ declare function foo3(cb: (x: number) => number): typeof cb; var r5 = foo3((x: number) => ''); // error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: number) => string' is not assignable to parameter type '(x: number) => number'. \ No newline at end of file +!!! Argument of type '(x: number) => string' is not assignable to parameter of type '(x: number) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt index af22e026f28..55e240c1a6e 100644 --- a/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt +++ b/tests/baselines/reference/trailingCommaInHeterogenousArrayLiteral1.errors.txt @@ -5,11 +5,11 @@ // these two should give the same error this.test([1, 2, "hi", 5, ]); ~~~~~~~~~~~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'number[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. !!! Type '{}' is not assignable to type 'number'. this.test([1, 2, "hi", 5]); ~~~~~~~~~~~~~~~ -!!! Argument type '{}[]' is not assignable to parameter type 'number[]'. +!!! Argument of type '{}[]' is not assignable to parameter of type 'number[]'. !!! Type '{}' is not assignable to type 'number'. } } diff --git a/tests/baselines/reference/typeArgInference2WithError.errors.txt b/tests/baselines/reference/typeArgInference2WithError.errors.txt index 2397413b140..de456ae4b14 100644 --- a/tests/baselines/reference/typeArgInference2WithError.errors.txt +++ b/tests/baselines/reference/typeArgInference2WithError.errors.txt @@ -7,4 +7,4 @@ var z7 = foo("abc", 5); // Error ~~~~~ -!!! Argument type 'string' is not assignable to parameter type 'Item'. \ No newline at end of file +!!! Argument of type 'string' is not assignable to parameter of type 'Item'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt index 327b15144cf..7113b56013b 100644 --- a/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceConstructSignatures.errors.txt @@ -25,7 +25,7 @@ new someGenerics1(3, 4); new someGenerics1(3, 4); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. new someGenerics1(3, 4); // Generic call with argument of function type whose parameter is of type parameter type @@ -65,7 +65,7 @@ new someGenerics4('', () => 3); new someGenerics4('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. new someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type @@ -77,7 +77,7 @@ new someGenerics5('', () => 3); new someGenerics5('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. new someGenerics5(null, null); // Generic call with multiple arguments of function types that each have parameters of the same generic type @@ -89,7 +89,7 @@ new someGenerics6(n => n, n => n, n => n); new someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ~~~~~~~~~~~~~~~~ -!!! Argument type '(n: string) => string' is not assignable to parameter type '(b: number) => number'. +!!! Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. new someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); // Generic call with multiple arguments of function types that each have parameters of different generic type diff --git a/tests/baselines/reference/typeArgumentInferenceErrors.errors.txt b/tests/baselines/reference/typeArgumentInferenceErrors.errors.txt index 91d650183d1..ce7ee8678c3 100644 --- a/tests/baselines/reference/typeArgumentInferenceErrors.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceErrors.errors.txt @@ -3,23 +3,23 @@ function someGenerics1(n: T, m: number) { } someGenerics1(3, 4); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. // 2 parameter generic call with argument 1 of type parameter type and argument 2 of function type whose parameter is of type parameter type function someGenerics4(n: T, f: (x: U) => void) { } someGenerics4('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type function someGenerics5(n: T, f: (x: U) => void) { } someGenerics5('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. // Generic call with multiple arguments of function types that each have parameters of the same generic type function someGenerics6(a: (a: A) => A, b: (b: A) => A, c: (c: A) => A) { } someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ~~~~~~~~~~~~~~~~ -!!! Argument type '(n: string) => string' is not assignable to parameter type '(b: number) => number'. +!!! Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. \ No newline at end of file diff --git a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt index c67c130076e..18952a3a561 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt +++ b/tests/baselines/reference/typeArgumentInferenceWithConstraints.errors.txt @@ -20,7 +20,7 @@ someGenerics1(3, 4); // Valid someGenerics1(3, 4); // Error ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. someGenerics1(3, 4); // Error someGenerics1(3, 4); @@ -51,7 +51,7 @@ someGenerics4('', () => 3); someGenerics4('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. someGenerics4(null, null); // 2 parameter generic call with argument 2 of type parameter type and argument 1 of function type whose parameter is of type parameter type @@ -60,7 +60,7 @@ someGenerics5('', () => 3); someGenerics5('', (x: string) => ''); // Error ~~~~~~~~~~~~~~~~~ -!!! Argument type '(x: string) => string' is not assignable to parameter type '(x: number) => void'. +!!! Argument of type '(x: string) => string' is not assignable to parameter of type '(x: number) => void'. someGenerics5(null, null); // Error ~~~~~~ !!! Type 'string' does not satisfy the constraint 'number'. @@ -71,7 +71,7 @@ someGenerics6(n => n, n => n, n => n); someGenerics6((n: number) => n, (n: string) => n, (n: number) => n); // Error ~~~~~~~~~~~~~~~~ -!!! Argument type '(n: string) => string' is not assignable to parameter type '(b: number) => number'. +!!! Argument of type '(n: string) => string' is not assignable to parameter of type '(b: number) => number'. someGenerics6((n: number) => n, (n: number) => n, (n: number) => n); // Generic call with multiple arguments of function types that each have parameters of different generic type @@ -84,7 +84,7 @@ function someGenerics8(n: T): T { return n; } var x = someGenerics8(someGenerics7); // Error ~~~~~~~~~~~~~ -!!! Argument type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter type 'string'. +!!! Argument of type '(a: (a: A) => A, b: (b: B) => B, c: (c: C) => C) => void' is not assignable to parameter of type 'string'. x(null, null, null); // Error // Generic call with multiple parameters of generic type passed arguments with no best common type diff --git a/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt b/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt index a618a9aa71e..5c724afbadd 100644 --- a/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt +++ b/tests/baselines/reference/typeArgumentsOnFunctionsWithNoTypeParameters.errors.txt @@ -5,7 +5,7 @@ !!! Supplied parameters do not match any signature of call target. var r2 = f(1); ~ -!!! Argument type 'number' is not assignable to parameter type 'T'. +!!! Argument of type 'number' is not assignable to parameter of type 'T'. var r3 = f(null); ~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/typeAssertionToGenericFunctionType.errors.txt b/tests/baselines/reference/typeAssertionToGenericFunctionType.errors.txt index 60689794bc1..24bb6fc1f79 100644 --- a/tests/baselines/reference/typeAssertionToGenericFunctionType.errors.txt +++ b/tests/baselines/reference/typeAssertionToGenericFunctionType.errors.txt @@ -5,7 +5,7 @@ } x.a(1); // bug was that this caused 'Could not find symbol T' on return type T in the type assertion on x.a's definition ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. x.b(); // error ~~~~~~~~~~~~~ !!! Supplied parameters do not match any signature of call target. \ No newline at end of file diff --git a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt index 952430cd096..82b546a981e 100644 --- a/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt +++ b/tests/baselines/reference/typeIdentityConsidersBrands.errors.txt @@ -34,5 +34,5 @@ !!! Private property 'name' cannot be reimplemented. foo2(a2); // should error ~~ -!!! Argument type 'Y_1' is not assignable to parameter type 'X_1'. +!!! Argument of type 'Y_1' is not assignable to parameter of type 'X_1'. \ No newline at end of file diff --git a/tests/baselines/reference/typeOfOnTypeArg.errors.txt b/tests/baselines/reference/typeOfOnTypeArg.errors.txt index a66f9667202..8734545e007 100644 --- a/tests/baselines/reference/typeOfOnTypeArg.errors.txt +++ b/tests/baselines/reference/typeOfOnTypeArg.errors.txt @@ -7,5 +7,5 @@ fill(32); ~~ -!!! Argument type 'number' is not assignable to parameter type '{ '': number; }'. +!!! Argument of type 'number' is not assignable to parameter of type '{ '': number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredModuleError.errors.txt b/tests/baselines/reference/undeclaredModuleError.errors.txt index 4329f431bd3..d044b29f76d 100644 --- a/tests/baselines/reference/undeclaredModuleError.errors.txt +++ b/tests/baselines/reference/undeclaredModuleError.errors.txt @@ -12,7 +12,7 @@ ~~~~~~~ } , (error: Error, files: {}[]) => { ~~~~~~~~~ -!!! Argument type '() => void' is not assignable to parameter type '(stat: unknown, name: string) => boolean'. +!!! Argument of type '() => void' is not assignable to parameter of type '(stat: unknown, name: string) => boolean'. files.forEach((file) => { var fullPath = join(IDoNotExist); ~~~~~~~~~~~ diff --git a/tests/baselines/reference/vararg.errors.txt b/tests/baselines/reference/vararg.errors.txt index f3905a367b9..6ac7c5e48b6 100644 --- a/tests/baselines/reference/vararg.errors.txt +++ b/tests/baselines/reference/vararg.errors.txt @@ -36,18 +36,18 @@ var result=""; result+=x.f(x,3,3); // bad first param ~ -!!! Argument type 'C' is not assignable to parameter type 'string'. +!!! Argument of type 'C' is not assignable to parameter of type 'string'. result+=x.f(3,"hello",3); // bad second param ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. result+=x.f("hello",3,3,3,3,3); // ok result+=x.f("hello"); // ok varargs length 0 result+=x.fonly(3); // ok conversion ~ -!!! Argument type 'number' is not assignable to parameter type 'string'. +!!! Argument of type 'number' is not assignable to parameter of type 'string'. result+=x.fonly(x); // bad param ~ -!!! Argument type 'C' is not assignable to parameter type 'string'. +!!! Argument of type 'C' is not assignable to parameter of type 'string'. result+=x.fonly("a"); // ok result+=x.fonly("a","b","c","d"); //ok diff --git a/tests/baselines/reference/voidArrayLit.errors.txt b/tests/baselines/reference/voidArrayLit.errors.txt index cf71f28acdd..dba674138d0 100644 --- a/tests/baselines/reference/voidArrayLit.errors.txt +++ b/tests/baselines/reference/voidArrayLit.errors.txt @@ -4,5 +4,5 @@ function foo(s:string) {} foo((()=>{})()); // error ~~~~~~~~~~ -!!! Argument type 'void' is not assignable to parameter type 'string'. +!!! Argument of type 'void' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt b/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt index 919b2679e1e..f2959f53b5d 100644 --- a/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt +++ b/tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt @@ -13,4 +13,4 @@ var r = c.foo(''); var r2 = r({ length: 3, charAt: (x: number) => { '' } }); // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! Argument type '{ length: number; charAt: (x: number) => void; }' is not assignable to parameter type 'string'. \ No newline at end of file +!!! Argument of type '{ length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'. \ No newline at end of file