From 68968fd396326a4a5ba1418ab24e576f11eb8c46 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Wed, 26 Jun 2019 10:05:44 -0700 Subject: [PATCH] Improve error messages and related spans --- src/compiler/checker.ts | 25 +-- src/compiler/diagnosticMessages.json | 18 +- .../reference/bigintWithLib.errors.txt | 20 +-- .../checkJsxChildrenCanBeTupleType.errors.txt | 8 +- .../constructorOverloads1.errors.txt | 16 +- ...StringLiteralsInJsxAttributes02.errors.txt | 32 ++-- .../controlFlowIterationErrors.errors.txt | 16 +- tests/baselines/reference/for-of39.errors.txt | 8 +- .../reference/functionOverloads2.errors.txt | 8 +- .../reference/functionOverloads40.errors.txt | 8 +- .../reference/functionOverloads41.errors.txt | 8 +- ...edMethodWithOverloadedArguments.errors.txt | 26 +-- .../heterogeneousArrayAndOverloads.errors.txt | 12 +- .../reference/incompatibleTypes.errors.txt | 16 +- ...ritedConstructorWithRestParams2.errors.txt | 16 +- .../iterableArrayPattern28.errors.txt | 8 +- .../iteratorSpreadInArray6.errors.txt | 8 +- ...attersForSignatureGroupIdentity.errors.txt | 16 +- .../baselines/reference/overload1.errors.txt | 8 +- .../reference/overloadResolution.errors.txt | 24 +-- ...loadResolutionClassConstructors.errors.txt | 8 +- .../overloadResolutionConstructors.errors.txt | 24 +-- .../overloadResolutionTest1.errors.txt | 24 +-- .../overloadingOnConstants2.errors.txt | 8 +- ...nWithConstraintCheckingDeferred.errors.txt | 10 +- .../overloadsWithProvisionalErrors.errors.txt | 16 +- .../reference/promisePermutations.errors.txt | 165 +++++++++++------- .../reference/promisePermutations2.errors.txt | 60 ++++--- .../reference/promisePermutations3.errors.txt | 105 ++++++----- .../reference/promiseTypeInference.errors.txt | 8 +- ...actDefaultPropsInferenceSuccess.errors.txt | 24 +-- .../recursiveFunctionTypes.errors.txt | 10 +- ...edSignatureAsCallbackParameter1.errors.txt | 16 +- .../reference/strictBindCallApply1.errors.txt | 32 ++-- ...eStringsWithOverloadResolution1.errors.txt | 32 ++-- ...ingsWithOverloadResolution1_ES6.errors.txt | 32 ++-- ...eStringsWithOverloadResolution3.errors.txt | 24 +-- ...ingsWithOverloadResolution3_ES6.errors.txt | 24 +-- .../tsxElementResolution9.errors.txt | 24 +-- .../tsxNotUsingApparentTypeOfSFC.errors.txt | 8 +- ...elessFunctionComponentOverload4.errors.txt | 96 +++++----- ...elessFunctionComponentOverload5.errors.txt | 40 ++--- ...ionComponentsWithTypeArguments4.errors.txt | 20 +-- .../reference/underscoreTest1.errors.txt | 8 +- .../unionTypeCallSignatures.errors.txt | 16 +- .../unionTypeConstructSignatures.errors.txt | 16 +- 46 files changed, 615 insertions(+), 536 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ea2b0ecd199..e26a8a46436 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21609,18 +21609,19 @@ namespace ts { let chain: DiagnosticMessageChain | undefined; if (candidatesForArgumentError.length > 3) { chain = chainDiagnosticMessages(chain, Diagnostics.The_last_overload_gave_the_following_error); - chain = chainDiagnosticMessages(chain, Diagnostics.No_suitable_overload_for_this_call); + chain = chainDiagnosticMessages(chain, Diagnostics.No_overload_matches_this_call); } - const ds = getSignatureApplicabilityError(node, args, last, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, () => chain); - if (ds) { - // if elaboration already displayed the error, don't do anything extra - // note that we could do this always here, but getSignatureApplicabilityError is currently not configured to do that - for (const d of ds) { + const diags = getSignatureApplicabilityError(node, args, last, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, () => chain); + if (diags) { + for (const d of diags) { + if (last.declaration && candidatesForArgumentError.length > 3) { + addRelatedInfo(d, createDiagnosticForNode(last.declaration, Diagnostics.The_last_overload_is_declared_here)); + } diagnostics.add(d); } } else { - Debug.assert(false, "No error for last overload signature"); + Debug.fail("No error for last overload signature"); } } else { @@ -21629,15 +21630,15 @@ namespace ts { for (const c of candidatesForArgumentError) { i++; const chain = () => chainDiagnosticMessages(/*details*/ undefined, Diagnostics.Overload_0_of_1_2_gave_the_following_error, i, candidates.length, signatureToString(c)); - const ds = getSignatureApplicabilityError(node, args, c, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, chain); - if (ds) { - related.push(...ds); + const diags = getSignatureApplicabilityError(node, args, c, assignableRelation, CheckMode.Normal, /*reportErrors*/ true, chain); + if (diags) { + related.push(...diags); } else { - Debug.assert(false, "No error for 3 or fewer overload signatures"); + Debug.fail("No error for 3 or fewer overload signatures"); } } - diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(/*details*/ undefined, Diagnostics.No_suitable_overload_for_this_call), related)); + diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(/*details*/ undefined, Diagnostics.No_overload_matches_this_call), related)); } } else if (candidateForArgumentArityError) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7d2a344c777..8dbc74c6b12 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2621,18 +2621,30 @@ "category": "Error", "code": 2754 }, - "No suitable overload for this call.": { + "No overload matches this call.": { "category": "Error", "code": 2755 }, - "The last overload gave the following error.": { + "The closest overload gave the following error.": { "category": "Error", "code": 2756 }, - "Overload {0} of {1}, '{2}', gave the following error.": { + "The closest overload is declared here.": { "category": "Error", "code": 2757 }, + "The last overload gave the following error.": { + "category": "Error", + "code": 2758 + }, + "The last overload is declared here.": { + "category": "Error", + "code": 2759 + }, + "Overload {0} of {1}, '{2}', gave the following error.": { + "category": "Error", + "code": 2760 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index c716a1dda26..836e2397ae3 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/bigintWithLib.ts(4,1): error TS2350: Only a void function can be called with the 'new' keyword. -tests/cases/compiler/bigintWithLib.ts(16,15): error TS2755: No suitable overload for this call. +tests/cases/compiler/bigintWithLib.ts(16,15): error TS2755: No overload matches this call. tests/cases/compiler/bigintWithLib.ts(21,13): error TS2540: Cannot assign to 'length' because it is a read-only property. -tests/cases/compiler/bigintWithLib.ts(28,16): error TS2755: No suitable overload for this call. +tests/cases/compiler/bigintWithLib.ts(28,16): error TS2755: No overload matches this call. tests/cases/compiler/bigintWithLib.ts(33,13): error TS2540: Cannot assign to 'length' because it is a read-only property. tests/cases/compiler/bigintWithLib.ts(40,25): error TS2345: Argument of type '-1' is not assignable to parameter of type 'bigint'. tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '123' is not assignable to parameter of type 'bigint'. @@ -27,10 +27,10 @@ tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '12 bigIntArray = new BigInt64Array([1n, 2n, 3n]); bigIntArray = new BigInt64Array([1, 2, 3]); // should error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. Types of property '[Symbol.iterator]' are incompatible. Type '() => IterableIterator' is not assignable to type '() => Iterator'. @@ -39,7 +39,7 @@ tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '12 Type '(value?: any) => IteratorResult' is not assignable to type '(value?: any) => IteratorResult'. Type 'IteratorResult' is not assignable to type 'IteratorResult'. Type 'number' is not assignable to type 'bigint'. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigInt64Array', gave the following error. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:16:33: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] bigIntArray = new BigInt64Array(new ArrayBuffer(80)); @@ -57,12 +57,12 @@ tests/cases/compiler/bigintWithLib.ts(43,26): error TS2345: Argument of type '12 bigUintArray = new BigUint64Array([1n, 2n, 3n]); bigUintArray = new BigUint64Array([1, 2, 3]); // should error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. -!!! related TS2757 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigUint64Array', gave the following error. +!!! related TS2760 tests/cases/compiler/bigintWithLib.ts:28:35: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. Type 'number[]' is not assignable to type 'SharedArrayBuffer'. bigUintArray = new BigUint64Array(new ArrayBuffer(80)); diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt index 8348b2cfe11..5e38aa9c574 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2755: No suitable overload for this call. +tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2755: No overload matches this call. ==== tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx (1 errors) ==== @@ -20,14 +20,14 @@ tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2 const testErr = ~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx:17:18: Overload 1 of 2, '(props: Readonly): ResizablePanel', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx:17:18: Overload 1 of 2, '(props: Readonly): ResizablePanel', gave the following error. Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly'. Types of property 'children' are incompatible. Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'. Types of property 'length' are incompatible. Type '3' is not assignable to type '2'. -!!! related TS2757 tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx:17:18: Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx:17:18: Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error. Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly'. Types of property 'children' are incompatible. Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'. diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index 2a1dc25f0c2..5f560ff38d8 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -2,8 +2,8 @@ tests/cases/compiler/constructorOverloads1.ts(2,5): error TS2392: Multiple const tests/cases/compiler/constructorOverloads1.ts(3,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/constructorOverloads1.ts(4,5): error TS2392: Multiple constructor implementations are not allowed. tests/cases/compiler/constructorOverloads1.ts(7,5): error TS2392: Multiple constructor implementations are not allowed. -tests/cases/compiler/constructorOverloads1.ts(16,10): error TS2755: No suitable overload for this call. -tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2755: No suitable overload for this call. +tests/cases/compiler/constructorOverloads1.ts(16,10): error TS2755: No overload matches this call. +tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2755: No overload matches this call. ==== tests/cases/compiler/constructorOverloads1.ts (6 errors) ==== @@ -36,17 +36,17 @@ tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2755: No suitable var f2 = new Foo(0); var f3 = new Foo(f1); ~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/constructorOverloads1.ts:16:18: Overload 1 of 2, '(s: string): Foo', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/constructorOverloads1.ts:16:18: Overload 1 of 2, '(s: string): Foo', gave the following error. Argument of type 'Foo' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/constructorOverloads1.ts:16:18: Overload 2 of 2, '(n: number): Foo', gave the following error. +!!! related TS2760 tests/cases/compiler/constructorOverloads1.ts:16:18: Overload 2 of 2, '(n: number): Foo', gave the following error. Argument of type 'Foo' is not assignable to parameter of type 'number'. var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/constructorOverloads1.ts:17:18: Overload 1 of 2, '(s: string): Foo', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/constructorOverloads1.ts:17:18: Overload 1 of 2, '(s: string): Foo', gave the following error. Argument of type 'any[]' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/constructorOverloads1.ts:17:18: Overload 2 of 2, '(n: number): Foo', gave the following error. +!!! related TS2760 tests/cases/compiler/constructorOverloads1.ts:17:18: Overload 2 of 2, '(n: number): Foo', gave the following error. Argument of type 'any[]' is not assignable to parameter of type 'number'. f1.bar1(); diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt index 890eb71337f..73fc41eeaf8 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(28,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(30,12): error TS2755: No suitable overload for this call. +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,12): error TS2755: No overload matches this call. +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(28,12): error TS2755: No overload matches this call. +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,12): error TS2755: No overload matches this call. +tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(30,12): error TS2755: No overload matches this call. tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(33,13): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,13): error TS2322: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. @@ -37,38 +37,38 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,13): err const b0 = {console.log(k)}}} extra />; // k has type "left" | "right" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:27:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. const b2 = {console.log(k)}} extra />; // k has type "left" | "right" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:28:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. const b3 = ; // goTo has type"home" | "contact" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. Type '{ extra: true; goTo: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:29:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. const b4 = ; // goTo has type "home" | "contact" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:13: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. Type '{ goTo: string; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'goTo' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! related TS2757 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx:30:13: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. diff --git a/tests/baselines/reference/controlFlowIterationErrors.errors.txt b/tests/baselines/reference/controlFlowIterationErrors.errors.txt index aaf153f3b44..4ce7e28a5d1 100644 --- a/tests/baselines/reference/controlFlowIterationErrors.errors.txt +++ b/tests/baselines/reference/controlFlowIterationErrors.errors.txt @@ -2,8 +2,8 @@ tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(11,17): error Type 'number' is not assignable to type 'string'. tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(22,17): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'string'. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(34,13): error TS2755: No suitable overload for this call. -tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error TS2755: No suitable overload for this call. +tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(34,13): error TS2755: No overload matches this call. +tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error TS2755: No overload matches this call. ==== tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts (4 errors) ==== @@ -48,11 +48,11 @@ tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error while (cond) { x = foo(x); ~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:34:17: Overload 1 of 2, '(x: string): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:34:17: Overload 1 of 2, '(x: string): number', gave the following error. Argument of type 'string | number' is not assignable to parameter of type 'string'. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:34:17: Overload 2 of 2, '(x: number): string', gave the following error. +!!! related TS2760 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:34:17: Overload 2 of 2, '(x: number): string', gave the following error. Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. x; @@ -67,11 +67,11 @@ tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error x; x = foo(x); ~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:45:17: Overload 1 of 2, '(x: string): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:45:17: Overload 1 of 2, '(x: string): number', gave the following error. Argument of type 'string | number' is not assignable to parameter of type 'string'. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:45:17: Overload 2 of 2, '(x: number): string', gave the following error. +!!! related TS2760 tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts:45:17: Overload 2 of 2, '(x: number): string', gave the following error. Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. } diff --git a/tests/baselines/reference/for-of39.errors.txt b/tests/baselines/reference/for-of39.errors.txt index d5e48579c28..36bdbdf9447 100644 --- a/tests/baselines/reference/for-of39.errors.txt +++ b/tests/baselines/reference/for-of39.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2755: No overload matches this call. ==== tests/cases/conformance/es6/for-ofStatements/for-of39.ts (1 errors) ==== var map = new Map([["", true], ["", 0]]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/for-ofStatements/for-of39.ts:1:19: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/for-ofStatements/for-of39.ts:1:19: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'Iterable'. Types of property '[Symbol.iterator]' are incompatible. Type '() => IterableIterator<[string, number] | [string, true]>' is not assignable to type '() => Iterator'. @@ -17,7 +17,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2755: No Type '[string, number]' is not assignable to type 'readonly [string, boolean]'. Types of property '1' are incompatible. Type 'number' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/conformance/es6/for-ofStatements/for-of39.ts:1:37: Overload 2 of 3, '(entries?: readonly (readonly [string, boolean])[]): Map', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/for-ofStatements/for-of39.ts:1:37: Overload 2 of 3, '(entries?: readonly (readonly [string, boolean])[]): Map', gave the following error. Type 'number' is not assignable to type 'boolean'. for (var [k, v] of map) { k; diff --git a/tests/baselines/reference/functionOverloads2.errors.txt b/tests/baselines/reference/functionOverloads2.errors.txt index 71149141f45..913c3cb49e3 100644 --- a/tests/baselines/reference/functionOverloads2.errors.txt +++ b/tests/baselines/reference/functionOverloads2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/functionOverloads2.ts(4,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/functionOverloads2.ts(4,9): error TS2755: No overload matches this call. ==== tests/cases/compiler/functionOverloads2.ts (1 errors) ==== @@ -7,8 +7,8 @@ tests/cases/compiler/functionOverloads2.ts(4,9): error TS2755: No suitable overl function foo(bar: any): any { return bar }; var x = foo(true); ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/functionOverloads2.ts:4:13: Overload 1 of 2, '(bar: string): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/functionOverloads2.ts:4:13: Overload 1 of 2, '(bar: string): string', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/functionOverloads2.ts:4:13: Overload 2 of 2, '(bar: number): number', gave the following error. +!!! related TS2760 tests/cases/compiler/functionOverloads2.ts:4:13: Overload 2 of 2, '(bar: number): number', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index b0706ed9650..9e99d383746 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/functionOverloads40.ts(4,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/functionOverloads40.ts(4,9): error TS2755: No overload matches this call. ==== tests/cases/compiler/functionOverloads40.ts (1 errors) ==== @@ -7,9 +7,9 @@ tests/cases/compiler/functionOverloads40.ts(4,9): error TS2755: No suitable over function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'bar'}]); ~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/functionOverloads40.ts:4:15: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/functionOverloads40.ts:4:15: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Type 'string' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/functionOverloads40.ts:4:15: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! related TS2760 tests/cases/compiler/functionOverloads40.ts:4:15: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index 430a6e295c6..95b3296e5c9 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/functionOverloads41.ts(4,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/functionOverloads41.ts(4,9): error TS2755: No overload matches this call. ==== tests/cases/compiler/functionOverloads41.ts (1 errors) ==== @@ -7,9 +7,9 @@ tests/cases/compiler/functionOverloads41.ts(4,9): error TS2755: No suitable over function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/functionOverloads41.ts:4:14: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/functionOverloads41.ts:4:14: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Property 'a' is missing in type '{}' but required in type '{ a: number; }'. -!!! related TS2757 tests/cases/compiler/functionOverloads41.ts:4:14: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! related TS2760 tests/cases/compiler/functionOverloads41.ts:4:14: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. Property 'a' is missing in type '{}' but required in type '{ a: boolean; }'. \ No newline at end of file diff --git a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt index 064ced0b442..9c1f49a581b 100644 --- a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt +++ b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(23,38): error TS2345: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(52,22): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(68,22): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(84,22): error TS2755: No suitable overload for this call. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(52,22): error TS2755: No overload matches this call. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(68,22): error TS2755: No overload matches this call. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(84,22): error TS2755: No overload matches this call. ==== tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts (4 errors) ==== @@ -64,12 +64,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:52:38: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:52:38: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:52:38: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:52:38: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. } @@ -89,15 +89,15 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 1 of 3, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 1 of 3, '(cb: (x: number) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 2 of 3, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 2 of 3, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 3 of 3, '(cb: (x: number) => Promise, error?: (error: any) => string, progress?: (preservation: any) => void): Promise', gave the following error. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:68:38: Overload 3 of 3, '(cb: (x: number) => Promise, error?: (error: any) => string, progress?: (preservation: any) => void): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. } @@ -117,12 +117,12 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:84:38: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:84:38: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:84:38: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! related TS2760 tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts:84:38: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. } diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index 8c2d8ed2617..d6ced6a25a1 100644 --- a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt +++ b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,9): error TS2755: No overload matches this call. ==== tests/cases/compiler/heterogeneousArrayAndOverloads.ts (1 errors) ==== @@ -12,14 +12,14 @@ tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,9): error TS2755: No su this.test([]); this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:26: Overload 1 of 2, '(arg1: number[]): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:26: Overload 1 of 2, '(arg1: number[]): any', gave the following error. Type 'string' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:20: Overload 2 of 2, '(arg1: string[]): any', gave the following error. +!!! related TS2760 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:20: Overload 2 of 2, '(arg1: string[]): any', gave the following error. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:23: Overload 2 of 2, '(arg1: string[]): any', gave the following error. +!!! related TS2760 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:23: Overload 2 of 2, '(arg1: string[]): any', gave the following error. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:32: Overload 2 of 2, '(arg1: string[]): any', gave the following error. +!!! related TS2760 tests/cases/compiler/heterogeneousArrayAndOverloads.ts:9:32: Overload 2 of 2, '(arg1: string[]): any', gave the following error. Type 'number' 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 b6b32526162..a9290e9988a 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -9,8 +9,8 @@ tests/cases/compiler/incompatibleTypes.ts(26,12): error TS2416: Property 'p1' in Type 'number' is not assignable to type 'string'. tests/cases/compiler/incompatibleTypes.ts(34,12): error TS2416: Property 'p1' in type 'C4' is not assignable to the same property in base type 'IFoo4'. Type '{ c: { b: string; }; d: string; }' is missing the following properties from type '{ a: { a: string; }; b: string; }': a, b -tests/cases/compiler/incompatibleTypes.ts(42,1): error TS2755: No suitable overload for this call. -tests/cases/compiler/incompatibleTypes.ts(49,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/incompatibleTypes.ts(42,1): error TS2755: No overload matches this call. +tests/cases/compiler/incompatibleTypes.ts(49,1): error TS2755: No overload matches this call. tests/cases/compiler/incompatibleTypes.ts(66,47): error TS2322: Type '{ e: number; f: number; }' is not assignable to type '{ a: { a: string; }; b: string; }'. Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. tests/cases/compiler/incompatibleTypes.ts(72,5): error TS2322: Type '5' is not assignable to type '() => string'. @@ -76,13 +76,13 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var c2: C2; if1(c1); ~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/incompatibleTypes.ts:42:5: Overload 1 of 2, '(i: IFoo1): void', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/incompatibleTypes.ts:42:5: Overload 1 of 2, '(i: IFoo1): void', gave the following error. Argument of type 'C1' is not assignable to parameter of type 'IFoo1'. Types of property 'p1' are incompatible. Type '() => string' is not assignable to type '() => number'. Type 'string' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/incompatibleTypes.ts:42:5: Overload 2 of 2, '(i: IFoo2): void', gave the following error. +!!! related TS2760 tests/cases/compiler/incompatibleTypes.ts:42:5: Overload 2 of 2, '(i: IFoo2): void', gave the following error. Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. Types of property 'p1' are incompatible. Type '() => string' is not assignable to type '(s: string) => number'. @@ -95,11 +95,11 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/incompatibleTypes.ts:49:7: Overload 1 of 2, '(n: { a: { a: string; }; b: string; }): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/incompatibleTypes.ts:49:7: Overload 1 of 2, '(n: { a: { a: string; }; b: string; }): number', gave the following error. Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ a: { a: string; }; b: string; }'. Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. -!!! related TS2757 tests/cases/compiler/incompatibleTypes.ts:49:7: Overload 2 of 2, '(s: { c: { b: string; }; d: string; }): string', gave the following error. +!!! related TS2760 tests/cases/compiler/incompatibleTypes.ts:49:7: Overload 2 of 2, '(s: { c: { b: string; }; d: string; }): string', gave the following error. Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt index 027e9788a45..da0ca0f92f9 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/inheritedConstructorWithRestParams2.ts(32,13): error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. -tests/cases/compiler/inheritedConstructorWithRestParams2.ts(33,1): error TS2755: No suitable overload for this call. -tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(33,1): error TS2755: No overload matches this call. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,1): error TS2755: No overload matches this call. ==== tests/cases/compiler/inheritedConstructorWithRestParams2.ts (3 errors) ==== @@ -40,15 +40,15 @@ tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,1): error TS2755: !!! error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. new Derived("", 3, "", 3); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:33:20: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:33:20: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. Argument of type '""' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:33:17: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. +!!! related TS2760 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:33:17: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. Argument of type '3' is not assignable to parameter of type 'string'. new Derived("", 3, "", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:34:20: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:34:20: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. Argument of type '""' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:34:17: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. +!!! related TS2760 tests/cases/compiler/inheritedConstructorWithRestParams2.ts:34:17: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. Argument of type '3' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/iterableArrayPattern28.errors.txt b/tests/baselines/reference/iterableArrayPattern28.errors.txt index 53e41cb1de3..a64d2b9a413 100644 --- a/tests/baselines/reference/iterableArrayPattern28.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern28.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error TS2755: No overload matches this call. ==== tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts (1 errors) ==== function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]: [string, number][]) { } takeFirstTwoEntries(...new Map([["", 0], ["hello", true]])); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts:2:32: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts:2:32: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'Iterable'. Types of property '[Symbol.iterator]' are incompatible. Type '() => IterableIterator<[string, number] | [string, boolean]>' is not assignable to type '() => Iterator'. @@ -18,5 +18,5 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error Type '[string, boolean]' is not assignable to type 'readonly [string, number]'. Types of property '1' are incompatible. Type 'boolean' is not assignable to type 'number'. -!!! related TS2757 tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts:2:52: Overload 2 of 3, '(entries?: readonly (readonly [string, number])[]): Map', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts:2:52: Overload 2 of 3, '(entries?: readonly (readonly [string, number])[]): Map', gave the following error. Type 'true' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/iteratorSpreadInArray6.errors.txt b/tests/baselines/reference/iteratorSpreadInArray6.errors.txt index 0747bd48366..6a11cc31fff 100644 --- a/tests/baselines/reference/iteratorSpreadInArray6.errors.txt +++ b/tests/baselines/reference/iteratorSpreadInArray6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,1): error TS2755: No overload matches this call. ==== tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts (1 errors) ==== @@ -18,13 +18,13 @@ tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,1): error TS2755 var array: number[] = [0, 1]; array.concat([...new SymbolIterator]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts:15:14: Overload 1 of 2, '(...items: ConcatArray[]): number[]', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts:15:14: Overload 1 of 2, '(...items: ConcatArray[]): number[]', gave the following error. Argument of type 'symbol[]' is not assignable to parameter of type 'ConcatArray'. Types of property 'slice' are incompatible. Type '(start?: number, end?: number) => symbol[]' is not assignable to type '(start?: number, end?: number) => number[]'. Type 'symbol[]' is not assignable to type 'number[]'. Type 'symbol' is not assignable to type 'number'. -!!! related TS2757 tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts:15:14: Overload 2 of 2, '(...items: (number | ConcatArray)[]): number[]', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts:15:14: Overload 2 of 2, '(...items: (number | ConcatArray)[]): number[]', gave the following error. Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray'. Type 'symbol[]' is not assignable to type 'ConcatArray'. \ No newline at end of file diff --git a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt index e525d7e6276..bcab0991b08 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS2755: No overload matches this call. tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(22,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'w' must be of type 'A', but here has type 'C'. -tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS2755: No overload matches this call. ==== tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts (3 errors) ==== @@ -24,11 +24,11 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS275 v({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:12: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:12: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. -!!! related TS2757 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:5: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. +!!! related TS2760 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:19:5: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. @@ -40,10 +40,10 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS275 w({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:12: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:12: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. -!!! related TS2757 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:5: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. +!!! related TS2760 tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts:24:5: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/overload1.errors.txt b/tests/baselines/reference/overload1.errors.txt index 775e77602f3..6625de2f9a6 100644 --- a/tests/baselines/reference/overload1.errors.txt +++ b/tests/baselines/reference/overload1.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/overload1.ts(29,1): error TS2322: Type 'number' is not assi tests/cases/compiler/overload1.ts(31,11): error TS2554: Expected 1-2 arguments, but got 3. tests/cases/compiler/overload1.ts(32,5): error TS2554: Expected 1-2 arguments, but got 0. tests/cases/compiler/overload1.ts(33,1): error TS2322: Type 'C' is not assignable to type 'string'. -tests/cases/compiler/overload1.ts(34,3): error TS2755: No suitable overload for this call. +tests/cases/compiler/overload1.ts(34,3): error TS2755: No overload matches this call. ==== tests/cases/compiler/overload1.ts (6 errors) ==== @@ -53,10 +53,10 @@ tests/cases/compiler/overload1.ts(34,3): error TS2755: No suitable overload for !!! error TS2322: Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overload1.ts:34:7: Overload 1 of 2, '(s1: string, s2: number): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overload1.ts:34:7: Overload 1 of 2, '(s1: string, s2: number): string', gave the following error. Argument of type '2' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/overload1.ts:34:9: Overload 2 of 2, '(s1: number, s2: string): number', gave the following error. +!!! related TS2760 tests/cases/compiler/overload1.ts:34:9: Overload 2 of 2, '(s1: number, s2: string): number', gave the following error. Argument of type '2' is not assignable to parameter of type 'string'. z=x.h("hello",0); // good diff --git a/tests/baselines/reference/overloadResolution.errors.txt b/tests/baselines/reference/overloadResolution.errors.txt index 6be2c4058c9..a64c341f2cb 100644 --- a/tests/baselines/reference/overloadResolution.errors.txt +++ b/tests/baselines/reference/overloadResolution.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(27,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(27,1): error TS2755: No overload matches this call. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(41,11): error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(63,5): error TS2558: Expected 3 type arguments, but got 4. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(70,21): error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(71,21): error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(81,5): error TS2344: Type 'boolean' does not satisfy the constraint 'number'. -tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(84,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(85,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(84,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(85,1): error TS2755: No overload matches this call. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,22): error TS2339: Property 'toFixed' does not exist on type 'string'. @@ -39,10 +39,10 @@ tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,22): // No candidate overloads found fn1({}); // Error ~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:27:5: Overload 1 of 2, '(s: string): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:27:5: Overload 1 of 2, '(s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:27:5: Overload 2 of 2, '(s: number): number', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:27:5: Overload 2 of 2, '(s: number): number', gave the following error. 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 @@ -112,17 +112,17 @@ tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,22): // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4(true, null); // Error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:84:5: Overload 1 of 2, '(n: string, m: any): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:84:5: Overload 1 of 2, '(n: string, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:84:5: Overload 2 of 2, '(n: number, m: any): any', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:84:5: Overload 2 of 2, '(n: number, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. fn4(null, true); // Error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:85:11: Overload 1 of 2, '(n: any, m: number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:85:11: Overload 1 of 2, '(n: any, m: number): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:85:11: Overload 2 of 2, '(n: any, m: string): any', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolution.ts:85:11: Overload 2 of 2, '(n: any, m: string): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt index 8cf0b4e0fd6..569fe146ac8 100644 --- a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(27,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(27,1): error TS2755: No overload matches this call. tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(60,9): error TS2558: Expected 3 type arguments, but got 1. tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(61,9): error TS2558: Expected 3 type arguments, but got 2. tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(65,9): error TS2558: Expected 3 type arguments, but got 4. @@ -43,10 +43,10 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstru // No candidate overloads found new fn1({}); // Error ~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts:27:9: Overload 1 of 2, '(s: string): fn1', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts:27:9: Overload 1 of 2, '(s: string): fn1', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts:27:9: Overload 2 of 2, '(s: number): fn1', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts:27:9: Overload 2 of 2, '(s: number): fn1', gave the following error. 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 diff --git a/tests/baselines/reference/overloadResolutionConstructors.errors.txt b/tests/baselines/reference/overloadResolutionConstructors.errors.txt index 769eab3a9eb..eef196f17cb 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionConstructors.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(27,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(27,1): error TS2755: No overload matches this call. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(43,15): error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(67,9): error TS2558: Expected 3 type arguments, but got 4. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(77,25): error TS2345: Argument of type '3' is not assignable to parameter of type 'string'. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(78,25): error TS2345: Argument of type '""' is not assignable to parameter of type 'number'. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(88,9): error TS2344: Type 'boolean' does not satisfy the constraint 'number'. -tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(91,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(92,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(91,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(92,1): error TS2755: No overload matches this call. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(100,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type 'string'. tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(100,26): error TS2339: Property 'toFixed' does not exist on type 'string'. @@ -39,10 +39,10 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors // No candidate overloads found new fn1({}); // Error ~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:27:9: Overload 1 of 2, '(s: string): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:27:9: Overload 1 of 2, '(s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:27:9: Overload 2 of 2, '(s: number): number', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:27:9: Overload 2 of 2, '(s: number): number', gave the following error. 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 @@ -119,17 +119,17 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints new fn4(true, null); // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:91:9: Overload 1 of 2, '(n: string, m: any): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:91:9: Overload 1 of 2, '(n: string, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:91:9: Overload 2 of 2, '(n: number, m: any): any', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:91:9: Overload 2 of 2, '(n: number, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. new fn4(null, true); // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:92:15: Overload 1 of 2, '(n: any, m: number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:92:15: Overload 1 of 2, '(n: any, m: number): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:92:15: Overload 2 of 2, '(n: any, m: string): any', gave the following error. +!!! related TS2760 tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts:92:15: Overload 2 of 2, '(n: any, m: string): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index f765e3d27d7..46f0bb623ff 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/overloadResolutionTest1.ts(7,12): error TS2755: No suitable overload for this call. -tests/cases/compiler/overloadResolutionTest1.ts(18,10): error TS2755: No suitable overload for this call. -tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/overloadResolutionTest1.ts(7,12): error TS2755: No overload matches this call. +tests/cases/compiler/overloadResolutionTest1.ts(18,10): error TS2755: No overload matches this call. +tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No overload matches this call. ==== tests/cases/compiler/overloadResolutionTest1.ts (3 errors) ==== @@ -12,10 +12,10 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No suitable var x11 = foo([{a:0}]); // works var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:7:18: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:7:18: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Type 'string' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:7:18: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:7:18: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. Type 'string' is not assignable to type 'boolean'. var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string @@ -29,10 +29,10 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No suitable var x3 = foo2({a:true}); // works var x4 = foo2({a:"s"}); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:18:16: Overload 1 of 2, '(bar: { a: number; }): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:18:16: Overload 1 of 2, '(bar: { a: number; }): string', gave the following error. Type 'string' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:18:16: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:18:16: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error. Type 'string' is not assignable to type 'boolean'. @@ -41,8 +41,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No suitable function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:24:15: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:24:15: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error. Type 'true' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/overloadResolutionTest1.ts:24:15: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadResolutionTest1.ts:24:15: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error. Type 'true' 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 6d1be3d8f24..d9844b26e28 100644 --- a/tests/baselines/reference/overloadingOnConstants2.errors.txt +++ b/tests/baselines/reference/overloadingOnConstants2.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2394: This overload signature is not compatible with its implementation signature. -tests/cases/compiler/overloadingOnConstants2.ts(15,9): error TS2755: No suitable overload for this call. +tests/cases/compiler/overloadingOnConstants2.ts(15,9): error TS2755: No overload matches this call. tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: This overload signature is not compatible with its implementation signature. @@ -23,10 +23,10 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2394: This overl var b: E = foo("bye", []); // E var c = foo("um", []); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadingOnConstants2.ts:15:13: Overload 1 of 2, '(x: "hi", items: string[]): D', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadingOnConstants2.ts:15:13: Overload 1 of 2, '(x: "hi", items: string[]): D', gave the following error. Argument of type '"um"' is not assignable to parameter of type '"hi"'. -!!! related TS2757 tests/cases/compiler/overloadingOnConstants2.ts:15:13: Overload 2 of 2, '(x: "bye", items: string[]): E', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadingOnConstants2.ts:15:13: Overload 2 of 2, '(x: "bye", items: string[]): E', gave the following error. Argument of type '"um"' is not assignable to parameter of type '"bye"'. diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 1804a123d84..b1254d24a8a 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(14,37): Property 'x' is missing in type 'D' but required in type 'A'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,5): error TS2322: Type 'string' is not assignable to type 'number'. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(16,38): error TS2344: Type 'D' does not satisfy the constraint 'A'. -tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,23): error TS2755: No suitable overload for this call. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,23): error TS2755: No overload matches this call. tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): error TS2344: Type 'D' does not satisfy the constraint 'A'. @@ -45,15 +45,15 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): ~~~~~~~~~~~~~ }); ~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. Argument of type '(x: D) => G' is not assignable to parameter of type '(x: D) => number'. Type 'G' is not assignable to type 'number'. -!!! related TS2757 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. Types of parameters 'x' and 'x' are incompatible. Property 'q' is missing in type 'C' but required in type 'D'. -!!! related TS2757 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:18:27: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. Types of parameters 'x' and 'x' are incompatible. Property 'q' is missing in type 'B' but required in type 'D'. diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 2f2d4a5f5cd..cc65c84b4a5 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,1): error TS2755: No overload matches this call. tests/cases/compiler/overloadsWithProvisionalErrors.ts(7,17): error TS2304: Cannot find name 'blah'. -tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,1): error TS2755: No overload matches this call. tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cannot find name 'blah'. @@ -12,20 +12,20 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann func(s => ({})); // Error for no applicable overload (object type is missing a and b) ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadsWithProvisionalErrors.ts:6:6: Overload 1 of 2, '(s: string): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadsWithProvisionalErrors.ts:6:6: Overload 1 of 2, '(s: string): number', gave the following error. Argument of type '(s: string) => {}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/overloadsWithProvisionalErrors.ts:6:11: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadsWithProvisionalErrors.ts:6:11: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. Type '{}' is missing the following properties from type '{ a: number; b: number; }': a, b 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) ~~~~ !!! error TS2304: 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 ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/overloadsWithProvisionalErrors.ts:8:6: Overload 1 of 2, '(s: string): number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/overloadsWithProvisionalErrors.ts:8:6: Overload 1 of 2, '(s: string): number', gave the following error. Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/compiler/overloadsWithProvisionalErrors.ts:8:11: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. +!!! related TS2760 tests/cases/compiler/overloadsWithProvisionalErrors.ts:8:11: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. Property 'b' is missing in type '{ a: any; }' but required in type '{ a: number; b: number; }'. ~~~~ !!! error TS2304: Cannot find name 'blah'. \ No newline at end of file diff --git a/tests/baselines/reference/promisePermutations.errors.txt b/tests/baselines/reference/promisePermutations.errors.txt index dfbc1f9a507..2a27563fa24 100644 --- a/tests/baselines/reference/promisePermutations.errors.txt +++ b/tests/baselines/reference/promisePermutations.errors.txt @@ -1,125 +1,125 @@ -tests/cases/compiler/promisePermutations.ts(74,70): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(74,70): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'IPromise' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(79,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(79,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(82,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(82,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(83,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(83,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(84,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(84,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(88,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(88,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(91,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(91,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(92,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(92,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. -tests/cases/compiler/promisePermutations.ts(93,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(93,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(97,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(97,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(100,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(100,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(101,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(101,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. -tests/cases/compiler/promisePermutations.ts(102,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(102,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(106,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(106,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations.ts(109,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(109,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations.ts(110,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(110,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations.ts(111,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(111,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations.ts(117,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(117,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(120,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(120,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(121,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(121,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. -tests/cases/compiler/promisePermutations.ts(122,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(122,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(126,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(126,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(129,33): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(129,33): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations.ts(132,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(132,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(133,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(133,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. -tests/cases/compiler/promisePermutations.ts(134,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(134,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations.ts(137,33): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(137,33): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. -tests/cases/compiler/promisePermutations.ts(144,35): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(144,35): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -tests/cases/compiler/promisePermutations.ts(152,36): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(152,36): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -tests/cases/compiler/promisePermutations.ts(156,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(156,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/promisePermutations.ts(158,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(158,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. -tests/cases/compiler/promisePermutations.ts(159,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(159,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'Promise' is not assignable to type 'IPromise'. @@ -206,126 +206,143 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable o var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'IPromise' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var r4: IPromise; var sIPromise: (x: any) => IPromise; var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -333,68 +350,78 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable o var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -403,9 +430,10 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable o var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // ok ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -415,38 +443,42 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable o var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2755: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:13:5: The last overload is declared here. var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. !!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'Promise' is not assignable to type 'IPromise'. @@ -455,6 +487,7 @@ tests/cases/compiler/promisePermutations.ts(160,21): error TS2755: No suitable o !!! error TS2755: Types of parameters 'onfulfilled' and 'success' are incompatible. !!! error TS2755: Types of parameters 'value' and 'value' are incompatible. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations.ts:5:5: The last overload is declared here. var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promisePermutations2.errors.txt b/tests/baselines/reference/promisePermutations2.errors.txt index 5845b3ab9aa..7c852d4e370 100644 --- a/tests/baselines/reference/promisePermutations2.errors.txt +++ b/tests/baselines/reference/promisePermutations2.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/promisePermutations2.ts(73,70): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'IPromise' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(78,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(78,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. @@ -15,46 +15,46 @@ tests/cases/compiler/promisePermutations2.ts(82,19): error TS2345: Argument of t tests/cases/compiler/promisePermutations2.ts(83,19): error TS2345: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations2.ts(87,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(87,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations2.ts(90,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations2.ts(91,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. tests/cases/compiler/promisePermutations2.ts(92,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(96,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(96,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations2.ts(99,19): error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations2.ts(100,19): error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. tests/cases/compiler/promisePermutations2.ts(101,19): error TS2345: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(105,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(105,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations2.ts(108,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(108,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(109,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(109,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations2.ts(110,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(110,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. -tests/cases/compiler/promisePermutations2.ts(116,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(116,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(119,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(120,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. tests/cases/compiler/promisePermutations2.ts(121,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(125,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(125,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations2.ts(128,33): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(128,33): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. @@ -64,12 +64,12 @@ tests/cases/compiler/promisePermutations2.ts(132,19): error TS2345: Argument of tests/cases/compiler/promisePermutations2.ts(133,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations2.ts(136,33): error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. -tests/cases/compiler/promisePermutations2.ts(143,35): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(143,35): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. tests/cases/compiler/promisePermutations2.ts(151,36): error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -tests/cases/compiler/promisePermutations2.ts(155,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations2.ts(155,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. @@ -172,11 +172,12 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var sPromise: (x: any) => Promise; var r4a = r4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r4b = r4.then(sIPromise, testFunction4, testFunction4).then(sIPromise, testFunction4, testFunction4); // ok var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error @@ -199,9 +200,10 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r5: IPromise; var r5a = r5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r5b = r5.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error @@ -218,9 +220,10 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r6: IPromise; var r6a = r6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r6b = r6.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error @@ -237,32 +240,36 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r7: IPromise; var r7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r7b = r7.then(sIPromise, sIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s7: Promise; var s7a = r7.then(testFunction7, testFunction7, testFunction7); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var s7b = r7.then(testFunction7P, testFunction7P, testFunction7P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var s7c = r7.then(testFunction7P, testFunction7, testFunction7); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'cb' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type '(a: T) => T'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var s7d = r7.then(sPromise, sPromise, sPromise).then(sPromise, sPromise, sPromise); // ok? var r8: IPromise; @@ -270,9 +277,10 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var nPromise: (x: any) => Promise; var r8a = r8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r8b = r8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error @@ -289,18 +297,20 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r9: IPromise; var r9a = r9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r9b = r9.then(sIPromise, sIPromise, sIPromise); // ok var r9c = r9.then(nIPromise, nIPromise, nIPromise); // ok var r9d = r9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r9e = r9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error @@ -326,9 +336,10 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r10c = r10.then(nIPromise, nIPromise, nIPromise); // ok var r10d = r10.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var r10e = r10.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var s10 = testFunction10P(x => x); var s10a = s10.then(testFunction10, testFunction10, testFunction10); // ok @@ -346,11 +357,12 @@ tests/cases/compiler/promisePermutations2.ts(159,21): error TS2345: Argument of var r11: IPromise; var r11a = r11.then(testFunction11, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations2.ts:12:5: The last overload is declared here. var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/promisePermutations3.errors.txt b/tests/baselines/reference/promisePermutations3.errors.txt index 1e59f21ae1b..4e00aba27b4 100644 --- a/tests/baselines/reference/promisePermutations3.errors.txt +++ b/tests/baselines/reference/promisePermutations3.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/promisePermutations3.ts(68,69): error TS2345: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'IPromise' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(73,70): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(73,70): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. Types of parameters 'x' and 'value' are incompatible. @@ -9,39 +9,39 @@ tests/cases/compiler/promisePermutations3.ts(73,70): error TS2755: No suitable o tests/cases/compiler/promisePermutations3.ts(78,19): error TS2345: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(81,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(81,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(82,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(82,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(83,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(83,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. Types of parameters 'x' and 'value' are incompatible. Type 'string' is not assignable to type 'number'. tests/cases/compiler/promisePermutations3.ts(87,19): error TS2345: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(90,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(90,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(91,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(91,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. -tests/cases/compiler/promisePermutations3.ts(92,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(92,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations3.ts(96,19): error TS2345: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(99,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(99,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(100,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(100,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. -tests/cases/compiler/promisePermutations3.ts(101,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(101,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. tests/cases/compiler/promisePermutations3.ts(105,19): error TS2345: Argument of type '(cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. @@ -55,50 +55,50 @@ tests/cases/compiler/promisePermutations3.ts(110,19): error TS2345: Argument of Types of parameters 'cb' and 'value' are incompatible. Type 'string' is not assignable to type '(a: T) => T'. tests/cases/compiler/promisePermutations3.ts(116,19): error TS2345: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(119,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(119,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(120,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(120,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. -tests/cases/compiler/promisePermutations3.ts(121,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(121,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(125,19): error TS2345: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. tests/cases/compiler/promisePermutations3.ts(128,33): error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/promisePermutations3.ts(131,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(131,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(132,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(132,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. -tests/cases/compiler/promisePermutations3.ts(133,19): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(133,19): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(136,33): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(136,33): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. tests/cases/compiler/promisePermutations3.ts(143,35): error TS2345: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. -tests/cases/compiler/promisePermutations3.ts(151,36): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(151,36): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. tests/cases/compiler/promisePermutations3.ts(155,21): error TS2345: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/promisePermutations3.ts(157,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(157,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'IPromise' is not assignable to type 'IPromise'. -tests/cases/compiler/promisePermutations3.ts(158,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(158,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. Type 'Promise' is not assignable to type 'Promise'. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/promisePermutations3.ts(159,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/promisePermutations3.ts(159,21): error TS2755: No overload matches this call. The last overload gave the following error. Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. Type 'Promise' is not assignable to type 'IPromise'. @@ -190,11 +190,12 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s3c = s3.then(testFunction3P, testFunction3, testFunction3); var s3d = s3.then(testFunction3P, testFunction3, testFunction3).then(testFunction3, testFunction3, testFunction3); ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number) => IPromise' is not assignable to parameter of type '(value: IPromise) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'IPromise' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var r4: IPromise; var sIPromise: (x: any) => IPromise; @@ -208,25 +209,28 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s4: Promise; var s4a = s4.then(testFunction4, testFunction4, testFunction4); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s4b = s4.then(testFunction4P, testFunction4P, testFunction4P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s4c = s4.then(testFunction4P, testFunction4, testFunction4); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, y?: string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. !!! error TS2755: Types of parameters 'x' and 'value' are incompatible. !!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s4d = s4.then(sIPromise, testFunction4P, testFunction4).then(sIPromise, testFunction4P, testFunction4); var r5: IPromise; @@ -237,19 +241,22 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s5: Promise; var s5a = s5.then(testFunction5, testFunction5, testFunction5); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s5b = s5.then(testFunction5P, testFunction5P, testFunction5P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s5c = s5.then(testFunction5P, testFunction5, testFunction5); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: string) => string) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s5d = s5.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r6: IPromise; @@ -260,19 +267,22 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s6: Promise; var s6a = s6.then(testFunction6, testFunction6, testFunction6); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s6b = s6.then(testFunction6P, testFunction6P, testFunction6P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s6c = s6.then(testFunction6P, testFunction6, testFunction6); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: number, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: string) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s6d = s6.then(sPromise, sPromise, sPromise).then(sIPromise, sIPromise, sIPromise); // ok var r7: IPromise; @@ -308,19 +318,22 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s8: Promise; var s8a = s8.then(testFunction8, testFunction8, testFunction8); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s8b = s8.then(testFunction8P, testFunction8P, testFunction8P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s8c = s8.then(testFunction8P, testFunction8, testFunction8); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: T) => T) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s8d = s8.then(nIPromise, nIPromise, nIPromise).then(nIPromise, nIPromise, nIPromise); // ok var r9: IPromise; @@ -338,27 +351,31 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s9: Promise; var s9a = s9.then(testFunction9, testFunction9, testFunction9); // error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => IPromise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s9b = s9.then(testFunction9P, testFunction9P, testFunction9P); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => Promise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s9c = s9.then(testFunction9P, testFunction9, testFunction9); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: T, cb: (a: U) => U) => Promise' is not assignable to parameter of type '(value: number) => IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s9d = s9.then(sPromise, sPromise, sPromise); // ok var s9e = s9.then(nPromise, nPromise, nPromise); // ok var s9f = s9.then(testFunction, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s9g = s9.then(testFunction, nIPromise, sIPromise).then(sIPromise, sIPromise, sIPromise); // ok var r10 = testFunction10(x => x); @@ -377,11 +394,12 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s10e = s10.then(nIPromise, nPromise, nIPromise); // ok var s10f = s10.then(testFunctionP, sIPromise, nIPromise); // error ~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '(x: any) => IPromise' is not assignable to parameter of type '(error: any) => Promise'. !!! error TS2755: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. !!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s10g = s10.then(testFunctionP, nIPromise, sIPromise).then(sPromise, sIPromise, sIPromise); // ok var r11: IPromise; @@ -393,20 +411,22 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of var s11: Promise; var s11a = s11.then(testFunction11, testFunction11, testFunction11); // ok ~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): IPromise; (x: string): IPromise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'IPromise' is not assignable to type 'IPromise'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s11b = s11.then(testFunction11P, testFunction11P, testFunction11P); // error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => Promise'. !!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var s11c = s11.then(testFunction11P, testFunction11, testFunction11); // error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. +!!! error TS2755: No overload matches this call. !!! error TS2755: The last overload gave the following error. !!! error TS2755: Argument of type '{ (x: number): Promise; (x: string): Promise; }' is not assignable to parameter of type '(value: number) => IPromise'. !!! error TS2755: Type 'Promise' is not assignable to type 'IPromise'. @@ -415,6 +435,7 @@ tests/cases/compiler/promisePermutations3.ts(165,21): error TS2345: Argument of !!! error TS2755: Types of parameters 'onfulfilled' and 'success' are incompatible. !!! error TS2755: Types of parameters 'value' and 'value' are incompatible. !!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! related TS2759 tests/cases/compiler/promisePermutations3.ts:7:5: The last overload is declared here. var r12 = testFunction12(x => x); var r12a = r12.then(testFunction12, testFunction12, testFunction12); // ok diff --git a/tests/baselines/reference/promiseTypeInference.errors.txt b/tests/baselines/reference/promiseTypeInference.errors.txt index ebd8bcf947b..237f3067063 100644 --- a/tests/baselines/reference/promiseTypeInference.errors.txt +++ b/tests/baselines/reference/promiseTypeInference.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2755: No suitable overload for this call. +tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2755: No overload matches this call. ==== tests/cases/compiler/promiseTypeInference.ts (1 errors) ==== @@ -13,10 +13,10 @@ tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2755: No suitable o var $$x = load("something").then(s => convert(s)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/promiseTypeInference.ts:10:39: Overload 1 of 2, '(success?: (value: string) => Promise): Promise', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/promiseTypeInference.ts:10:39: Overload 1 of 2, '(success?: (value: string) => Promise): Promise', gave the following error. Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! related TS2757 tests/cases/compiler/promiseTypeInference.ts:10:39: Overload 2 of 2, '(onfulfilled?: (value: string) => number | PromiseLike, onrejected?: (reason: any) => PromiseLike): Promise', gave the following error. +!!! related TS2760 tests/cases/compiler/promiseTypeInference.ts:10:39: Overload 2 of 2, '(onfulfilled?: (value: string) => number | PromiseLike, onrejected?: (reason: any) => PromiseLike): Promise', gave the following error. Type 'IPromise' is not assignable to type 'number | PromiseLike'. Type 'IPromise' is not assignable to type 'PromiseLike'. Types of property 'then' are incompatible. diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt index d49b31bc38d..9d8f05d7b35 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,21): error TS2755: No suitable overload for this call. -tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,22): error TS2755: No suitable overload for this call. -tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2755: No suitable overload for this call. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,21): error TS2755: No overload matches this call. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,22): error TS2755: No overload matches this call. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2755: No overload matches this call. ==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (3 errors) ==== @@ -32,12 +32,12 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2755: // Error: Void not assignable to boolean const Test2 = () => console.log(value)} />; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:27:36: Overload 1 of 2, '(props: Readonly): FieldFeedback', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:27:36: Overload 1 of 2, '(props: Readonly): FieldFeedback', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. Type 'void' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:27:36: Overload 2 of 2, '(props: Props, context?: any): FieldFeedback', gave the following error. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:27:36: Overload 2 of 2, '(props: Props, context?: any): FieldFeedback', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. @@ -57,12 +57,12 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2755: // Error: Void not assignable to boolean const Test2a = () => console.log(value)} error>Hah; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:43:41: Overload 1 of 2, '(props: Readonly): FieldFeedbackBeta', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:43:41: Overload 1 of 2, '(props: Readonly): FieldFeedbackBeta', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. Type 'void' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:43:41: Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta', gave the following error. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:43:41: Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta', gave the following error. Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. @@ -87,11 +87,11 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2755: // Error: Void not assignable to boolean const Test4 = () => console.log(value)} />; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:64:37: Overload 1 of 2, '(props: Readonly): FieldFeedback2', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:64:37: Overload 1 of 2, '(props: Readonly): FieldFeedback2', gave the following error. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. Type 'void' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:64:37: Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2', gave the following error. +!!! related TS2760 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:64:37: Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2', gave the following error. Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. // OK diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index 72821c437af..b0091454264 100644 --- a/tests/baselines/reference/recursiveFunctionTypes.errors.txt +++ b/tests/baselines/reference/recursiveFunctionTypes.errors.txt @@ -11,7 +11,7 @@ tests/cases/compiler/recursiveFunctionTypes.ts(30,10): error TS2394: This overlo tests/cases/compiler/recursiveFunctionTypes.ts(33,8): error TS2554: Expected 0-1 arguments, but got 2. tests/cases/compiler/recursiveFunctionTypes.ts(34,4): error TS2345: Argument of type '""' is not assignable to parameter of type '{ (): typeof f6; (a: typeof f6): () => number; }'. tests/cases/compiler/recursiveFunctionTypes.ts(42,8): error TS2554: Expected 0-1 arguments, but got 2. -tests/cases/compiler/recursiveFunctionTypes.ts(43,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/recursiveFunctionTypes.ts(43,1): error TS2755: No overload matches this call. ==== tests/cases/compiler/recursiveFunctionTypes.ts (13 errors) ==== @@ -85,11 +85,11 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,1): error TS2755: No suitable !!! error TS2554: Expected 0-1 arguments, but got 2. f7(""); // ok (function takes an any param) ~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 1 of 4, '(a: { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }): () => number', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 1 of 4, '(a: { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }): () => number', gave the following error. Argument of type '""' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. -!!! related TS2757 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 2 of 4, '(a: number): number', gave the following error. +!!! related TS2760 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 2 of 4, '(a: number): number', gave the following error. Argument of type '""' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 3 of 4, '(a?: { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }): { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }', gave the following error. +!!! related TS2760 tests/cases/compiler/recursiveFunctionTypes.ts:43:4: Overload 3 of 4, '(a?: { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }): { (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }', gave the following error. Argument of type '""' 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 8757e85713a..86f3e1c8904 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(7,1): error TS2755: No suitable overload for this call. -tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(7,1): error TS2755: No overload matches this call. +tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2755: No overload matches this call. ==== tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts (2 errors) ==== @@ -11,19 +11,19 @@ tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2 // both are errors x3(1, (x: string) => 1); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:7:7: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:7:7: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. Argument of type '(x: string) => number' is not assignable to parameter of type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:7:4: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. +!!! related TS2760 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:7:4: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. Argument of type '1' is not assignable to parameter of type 'string'. x3(1, (x: 'hm') => 1); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:8:7: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:8:7: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. Types of parameters 'x' and 'x' are incompatible. Type 'number' is not assignable to type '"hm"'. -!!! related TS2757 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:8:4: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. +!!! related TS2760 tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts:8:4: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. Argument of type '1' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/strictBindCallApply1.errors.txt b/tests/baselines/reference/strictBindCallApply1.errors.txt index e5e6fe1e850..496bee9108f 100644 --- a/tests/baselines/reference/strictBindCallApply1.errors.txt +++ b/tests/baselines/reference/strictBindCallApply1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2755: No suitable overload for this call. +tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2755: No overload matches this call. tests/cases/conformance/functions/strictBindCallApply1.ts(17,15): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(18,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(19,44): error TS2554: Expected 3 arguments, but got 4. @@ -8,8 +8,8 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(23,37): error TS2322: tests/cases/conformance/functions/strictBindCallApply1.ts(24,32): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. Types of property 'length' are incompatible. Type '3' is not assignable to type '2'. -tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2755: No suitable overload for this call. -tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2755: No suitable overload for this call. +tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2755: No overload matches this call. +tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2755: No overload matches this call. tests/cases/conformance/functions/strictBindCallApply1.ts(48,17): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(49,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(50,38): error TS2554: Expected 3 arguments, but got 4. @@ -18,7 +18,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(54,26): error TS2345: tests/cases/conformance/functions/strictBindCallApply1.ts(55,31): error TS2322: Type 'number' is not assignable to type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(56,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. tests/cases/conformance/functions/strictBindCallApply1.ts(57,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. -tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2755: No suitable overload for this call. +tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2755: No overload matches this call. tests/cases/conformance/functions/strictBindCallApply1.ts(65,3): error TS2554: Expected 3 arguments, but got 2. tests/cases/conformance/functions/strictBindCallApply1.ts(66,15): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. tests/cases/conformance/functions/strictBindCallApply1.ts(67,24): error TS2554: Expected 3 arguments, but got 4. @@ -40,10 +40,10 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: let f02 = foo.bind(undefined, 10, "hello"); let f03 = foo.bind(undefined, 10, 20); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:11:35: Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:11:35: Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error. Argument of type '20' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:11:11: Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:11:11: Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. The 'this' context of type '(a: number, b: string) => string' is not assignable to method's 'this' of type '(this: undefined, ...args: (10 | 20)[]) => string'. Types of parameters 'b' and 'args' are incompatible. Type '10 | 20' is not assignable to type 'string'. @@ -94,20 +94,20 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: let f12 = c.foo.bind(c, 10, "hello"); let f13 = c.foo.bind(c, 10, 20); // Error ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:41:29: Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:41:29: Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error. Argument of type '20' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:41:11: Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:41:11: Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error. The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (10 | 20)[]) => string'. Types of parameters 'b' and 'args' are incompatible. Type '10 | 20' is not assignable to type 'string'. Type '10' is not assignable to type 'string'. let f14 = c.foo.bind(undefined); // Error ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:42:22: Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:42:22: Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error. Argument of type 'undefined' is not assignable to parameter of type 'C'. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:42:11: Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:42:11: Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error. The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (string | number)[]) => string'. Types of parameters 'a' and 'args' are incompatible. Type 'string | number' is not assignable to type 'number'. @@ -149,10 +149,10 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345: let f22 = C.bind(undefined, 10, "hello"); let f23 = C.bind(undefined, 10, 20); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:62:33: Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:62:33: Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error. Argument of type '20' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/functions/strictBindCallApply1.ts:62:11: Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error. +!!! related TS2760 tests/cases/conformance/functions/strictBindCallApply1.ts:62:11: Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error. The 'this' context of type 'typeof C' is not assignable to method's 'this' of type 'new (...args: (10 | 20)[]) => C'. Types of parameters 'b' and 'args' are incompatible. Type '10 | 20' is not assignable to type 'string'. diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 187d7dab5cc..c8528ceaf93 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(9,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(10,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(11,9): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,9): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(13,9): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(11,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(13,9): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(14,23): error TS2554: Expected 1-3 arguments, but got 4. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,9): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,9): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(21,24): error TS2554: Expected 1-3 arguments, but got 4. @@ -28,24 +28,24 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var c = foo([], 1, 2); // boolean ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:11:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:11:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:11:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:11:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) ~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:12:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:12:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:12:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:12:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:13:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:13:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:13:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:13:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~ @@ -56,10 +56,10 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var w = foo `${1}${2}`; // boolean var x = foo `${1}${true}`; // boolean (with error) ~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:19:20: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:19:20: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:19:20: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts:19:20: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. var y = foo `${1}${"2"}`; // {} var z = foo `${1}${2}${3}`; // any (with error) diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt index 150c66be410..b103d9eef9e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(9,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. Property 'raw' is missing in type 'undefined[]' but required in type 'TemplateStringsArray'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(10,13): error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(11,9): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(12,9): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(13,9): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(11,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(12,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(13,9): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(14,23): error TS2554: Expected 1-3 arguments, but got 4. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(19,9): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(19,9): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(21,24): error TS2554: Expected 1-3 arguments, but got 4. @@ -28,24 +28,24 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio !!! error TS2345: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var c = foo([], 1, 2); // boolean ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:11:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:11:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:11:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:11:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) ~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:12:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:12:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:12:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:12:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:13:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:13:13: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:13:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:13:13: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~ @@ -56,10 +56,10 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var w = foo `${1}${2}`; // boolean var x = foo `${1}${true}`; // boolean (with error) ~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:19:20: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:19:20: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:19:20: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts:19:20: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. var y = foo `${1}${"2"}`; // {} var z = foo `${1}${2}${3}`; // any (with error) diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt index 4d5ec42700c..06986bf66f7 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(9,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(9,1): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(18,4): error TS2339: Property 'foo' does not exist on type 'Date'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(44,1): error TS2554: Expected 2-4 arguments, but got 1. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(62,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(63,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(62,1): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(63,1): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(69,18): error TS2339: Property 'toFixed' does not exist on type 'string'. @@ -17,10 +17,10 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // No candidate overloads found fn1 `${ {} }`; // Error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:9:9: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:9:9: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:9:9: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:9:9: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. Argument of type '{}' is not assignable to parameter of type 'number'. function fn2(strs: TemplateStringsArray, s: string, n: number): number; @@ -81,17 +81,17 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4 `${ true }${ null }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:62:9: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:62:9: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:62:9: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:62:9: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. fn4 `${ null }${ true }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:63:18: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:63:18: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:63:18: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts:63:18: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt index 2e1e1f2ffc1..1d641d2611e 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(9,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(9,1): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(18,4): error TS2339: Property 'foo' does not exist on type 'Date'. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(44,1): error TS2554: Expected 2-4 arguments, but got 1. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(62,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(63,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(62,1): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(63,1): error TS2755: No overload matches this call. tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(69,18): error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'? @@ -17,10 +17,10 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // No candidate overloads found fn1 `${ {} }`; // Error ~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:9:9: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:9:9: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:9:9: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:9:9: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. Argument of type '{}' is not assignable to parameter of type 'number'. function fn2(strs: TemplateStringsArray, s: string, n: number): number; @@ -81,17 +81,17 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints fn4 `${ true }${ null }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:62:9: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:62:9: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:62:9: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:62:9: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. fn4 `${ null }${ true }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:63:18: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:63:18: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:63:18: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. +!!! related TS2760 tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts:63:18: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors diff --git a/tests/baselines/reference/tsxElementResolution9.errors.txt b/tests/baselines/reference/tsxElementResolution9.errors.txt index b350fe0fdbc..6686890b839 100644 --- a/tests/baselines/reference/tsxElementResolution9.errors.txt +++ b/tests/baselines/reference/tsxElementResolution9.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/jsx/file.tsx(11,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(18,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/jsx/file.tsx(11,1): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(18,1): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No overload matches this call. ==== tests/cases/conformance/jsx/file.tsx (3 errors) ==== @@ -16,10 +16,10 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No suitable overload f var Obj1: Obj1; ; // Error, return type is not an object type ~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:11:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:11:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{}' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:11:2: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:11:2: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. interface Obj2 { @@ -29,10 +29,10 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No suitable overload f var Obj2: Obj2; ; // Error, return type is not an object type ~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:18:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:18:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{}' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:18:2: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:18:2: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. interface Obj3 { @@ -42,9 +42,9 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No suitable overload f var Obj3: Obj3; ; // OK ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:25:2: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{ x: number; }' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:2: Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:25:2: Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error. Type '{ x: number; }' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt index e06fffebe85..e85f25c0fdb 100644 --- a/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt +++ b/tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(14,14): error TS2322: Type '{}' is not assignable to type 'P'. '{}' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'. -tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2755: No suitable overload for this call. +tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2755: No overload matches this call. ==== tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx (2 errors) ==== @@ -23,10 +23,10 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2755: No s !!! error TS2322: '{}' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'. let y = ; // should error ~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:15:14: Overload 1 of 2, '(props: Readonly

): MyComponent', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:15:14: Overload 1 of 2, '(props: Readonly

): MyComponent', gave the following error. Type '{}' is not assignable to type 'Readonly

'. -!!! related TS2757 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:15:14: Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error. +!!! related TS2760 tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx:15:14: Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error. Type '{}' is not assignable to type 'Readonly

'. let z = // should work diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt index e1969542774..c95de6de1f3 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/jsx/file.tsx(12,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(13,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(14,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(16,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(17,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(25,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(26,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(33,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(34,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(35,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No suitable overload for this call. +tests/cases/conformance/jsx/file.tsx(12,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(13,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(14,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(16,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(17,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(25,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(26,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(33,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(34,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(35,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No overload matches this call. ==== tests/cases/conformance/jsx/file.tsx (11 errors) ==== @@ -25,45 +25,45 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No suitable overload // Error const c0 = ; // extra property; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:12:13: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:12:13: Overload 1 of 2, '(): Element', gave the following error. Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes'. Property 'extraProp' does not exist on type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:12:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:12:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. const c1 = ; // missing property; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:13:13: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:13:13: Overload 1 of 2, '(): Element', gave the following error. Type '{ yy: number; }' is not assignable to type 'IntrinsicAttributes'. Property 'yy' does not exist on type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:13:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:13:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'. const c2 = ; // type incompatible; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:14:13: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:14:13: Overload 1 of 2, '(): Element', gave the following error. Type '{ yy1: true; yy: number; }' is not assignable to type 'IntrinsicAttributes'. Property 'yy1' does not exist on type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:14:31: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:14:31: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. const c3 = ; // This is OK becuase all attribute are spread const c4 = ; // extra property; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:16:13: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:16:13: Overload 1 of 2, '(): Element', gave the following error. Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes'. Property 'y1' does not exist on type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:16:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:16:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. const c5 = ; // type incompatible; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:17:13: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:17:13: Overload 1 of 2, '(): Element', gave the following error. Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:17:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:17:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'. Types of property 'yy' are incompatible. Type 'boolean' is not assignable to type 'number'. @@ -76,18 +76,18 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No suitable overload // Error const d1 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:29: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:25:29: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:13: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:25:13: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'. const d2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:26:13: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:26:13: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. Type '{ yy: string; direction: string; }' is not assignable to type 'IntrinsicAttributes & { "extra-data": string; }'. Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:26:40: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:26:40: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. Type 'string' is not assignable to type 'number'. declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element; @@ -97,42 +97,42 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No suitable overload // Error const e1 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:29: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:33:29: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:29: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:33:29: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:32: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:33:32: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. const e2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:34:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:13: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:34:13: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:34:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. const e3 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:35:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. Type '{ y1: string; y2: number; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:35:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. Type 'string' is not assignable to type 'Element'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:35:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. const e4 = Hi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:36:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. Type '{ children: string; y1: string; y2: number; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:36:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. 'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:36:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt index 1b3b140d458..f364876a945 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/jsx/file.tsx(48,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(54,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(55,12): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No suitable overload for this call. +tests/cases/conformance/jsx/file.tsx(48,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(54,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(55,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No overload matches this call. ==== tests/cases/conformance/jsx/file.tsx (4 errors) ==== @@ -54,14 +54,14 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No suitable overload // Error const b0 = {}}>GO; // extra property; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:48:13: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:48:13: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:48:13: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:48:13: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:48:13: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:48:13: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. const b1 = {}} {...obj0}>Hello world; // extra property; @@ -71,28 +71,28 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No suitable overload const b5 = ; // Spread retain method declaration (see GitHub #13365), so now there is an extra attributes const b6 = ; // incorrect type for optional attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:54:51: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:54:51: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:54:51: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:54:51: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:54:51: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:54:51: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. const b7 = ; // incorrect type for optional attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:55:68: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:55:68: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:55:68: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:55:68: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:55:68: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:55:68: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. const b8 = ; // incorrect type for specified hyphanated name ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:56:13: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:56:13: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Property 'onClick' is missing in type '{ data-format: true; }' but required in type 'ButtonProps'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:56:13: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:56:13: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Property 'to' is missing in type '{ data-format: true; }' but required in type 'LinkProps'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:56:24: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:56:24: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt index d956253311b..a8d2a1c004e 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/jsx/file.tsx(9,14): error TS2755: No suitable overload for this call. -tests/cases/conformance/jsx/file.tsx(10,14): error TS2755: No suitable overload for this call. +tests/cases/conformance/jsx/file.tsx(9,14): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(10,14): error TS2755: No overload matches this call. ==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== @@ -13,23 +13,23 @@ tests/cases/conformance/jsx/file.tsx(10,14): error TS2755: No suitable overload function Baz(arg1: T, arg2: U) { let a0 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:9:15: Overload 1 of 3, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:9:15: Overload 1 of 3, '(): Element', gave the following error. Type '{ a: number; }' is not assignable to type 'IntrinsicAttributes'. Property 'a' does not exist on type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:9:33: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:9:33: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. Type 'number' is not assignable to type 'string'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:9:15: Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:9:15: Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error. Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'. let a2 = // missing a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:10:15: Overload 1 of 3, '(): Element', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:10:15: Overload 1 of 3, '(): Element', gave the following error. Type 'T & { ignore-prop: true; }' has no properties in common with type 'IntrinsicAttributes'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:10:15: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:10:15: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }'. Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: string; "ignore-prop": boolean; }'. -!!! related TS2757 tests/cases/conformance/jsx/file.tsx:10:15: Overload 3 of 3, '(attr: { b: unknown; a: unknown; }): Element', gave the following error. +!!! related TS2760 tests/cases/conformance/jsx/file.tsx:10:15: Overload 3 of 3, '(attr: { b: unknown; a: unknown; }): Element', gave the following error. Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'. Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: unknown; }'. } \ No newline at end of file diff --git a/tests/baselines/reference/underscoreTest1.errors.txt b/tests/baselines/reference/underscoreTest1.errors.txt index 971650a4f14..256b6e873aa 100644 --- a/tests/baselines/reference/underscoreTest1.errors.txt +++ b/tests/baselines/reference/underscoreTest1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/underscoreTest1_underscoreTests.ts(26,1): error TS2755: No suitable overload for this call. +tests/cases/compiler/underscoreTest1_underscoreTests.ts(26,1): error TS2755: No overload matches this call. ==== tests/cases/compiler/underscoreTest1_underscoreTests.ts (1 errors) ==== @@ -29,12 +29,12 @@ tests/cases/compiler/underscoreTest1_underscoreTests.ts(26,1): error TS2755: No _.all([true, 1, null, 'yes'], _.identity); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/compiler/underscoreTest1_underscoreTests.ts:26:31: Overload 1 of 2, '(list: (string | number | boolean)[], iterator?: Iterator_, context?: any): boolean', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/compiler/underscoreTest1_underscoreTests.ts:26:31: Overload 1 of 2, '(list: (string | number | boolean)[], iterator?: Iterator_, context?: any): boolean', gave the following error. Argument of type '(value: T) => T' is not assignable to parameter of type 'Iterator_'. Type 'string | number | boolean' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'boolean'. -!!! related TS2757 tests/cases/compiler/underscoreTest1_underscoreTests.ts:26:7: Overload 2 of 2, '(list: Dictionary, iterator?: Iterator_, context?: any): boolean', gave the following error. +!!! related TS2760 tests/cases/compiler/underscoreTest1_underscoreTests.ts:26:7: Overload 2 of 2, '(list: Dictionary, iterator?: Iterator_, context?: any): boolean', gave the following error. Argument of type '(string | number | boolean)[]' is not assignable to parameter of type 'Dictionary'. Index signature is missing in type '(string | number | boolean)[]'. diff --git a/tests/baselines/reference/unionTypeCallSignatures.errors.txt b/tests/baselines/reference/unionTypeCallSignatures.errors.txt index b0ce088ca1b..fd1a5cdb379 100644 --- a/tests/baselines/reference/unionTypeCallSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeCallSignatures.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(9,43): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. -tests/cases/conformance/types/union/unionTypeCallSignatures.ts(10,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/union/unionTypeCallSignatures.ts(15,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/types/union/unionTypeCallSignatures.ts(10,1): error TS2755: No overload matches this call. +tests/cases/conformance/types/union/unionTypeCallSignatures.ts(15,1): error TS2755: No overload matches this call. tests/cases/conformance/types/union/unionTypeCallSignatures.ts(16,1): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/types/union/unionTypeCallSignatures.ts(19,32): error TS2345: Argument of type '10' is not assignable to parameter of type 'never'. tests/cases/conformance/types/union/unionTypeCallSignatures.ts(20,32): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'never'. @@ -41,10 +41,10 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2 !!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:10:29: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:10:29: Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:10:29: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:10:29: Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. var unionOfDifferentReturnType1: { (a: number): number; (a: string): string; } | { (a: number): Date; (a: string): boolean; }; @@ -52,10 +52,10 @@ tests/cases/conformance/types/union/unionTypeCallSignatures.ts(73,12): error TS2 strOrBoolean = unionOfDifferentReturnType1("hello"); unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:15:29: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:15:29: Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:15:29: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeCallSignatures.ts:15:29: Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. unionOfDifferentReturnType1(); // error missing parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt index d0eadc3cedc..c277a2f6b24 100644 --- a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(9,47): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. -tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(10,1): error TS2755: No suitable overload for this call. -tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(15,1): error TS2755: No suitable overload for this call. +tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(10,1): error TS2755: No overload matches this call. +tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(15,1): error TS2755: No overload matches this call. tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(16,1): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(19,36): error TS2345: Argument of type '10' is not assignable to parameter of type 'never'. tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(20,36): error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'never'. @@ -40,10 +40,10 @@ tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(70,12): erro !!! error TS2345: Argument of type '"hello"' is not assignable to parameter of type 'number'. new unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:10:33: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:10:33: Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:10:33: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:10:33: Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. var unionOfDifferentReturnType1: { new (a: number): number; new (a: string): string; } | { new (a: number): Date; new (a: string): boolean; }; @@ -51,10 +51,10 @@ tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(70,12): erro strOrBoolean = new unionOfDifferentReturnType1("hello"); new unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No suitable overload for this call. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:15:33: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2755: No overload matches this call. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:15:33: Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. -!!! related TS2757 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:15:33: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! related TS2760 tests/cases/conformance/types/union/unionTypeConstructSignatures.ts:15:33: Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. new unionOfDifferentReturnType1(); // error missing parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~