From 34c4047371ea606787238955a5ebe064d0aaaddc Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 28 Jun 2019 16:26:52 -0700 Subject: [PATCH] Update baselines with new error numbers --- .../reference/bigintWithLib.errors.txt | 50 ++--- .../constructorOverloads1.errors.txt | 24 +-- ...StringLiteralsInJsxAttributes02.errors.txt | 64 +++---- .../controlFlowIterationErrors.errors.txt | 32 ++-- tests/baselines/reference/for-of39.errors.txt | 32 ++-- .../reference/functionOverloads2.errors.txt | 12 +- .../reference/functionOverloads40.errors.txt | 12 +- .../reference/functionOverloads41.errors.txt | 12 +- ...edMethodWithOverloadedArguments.errors.txt | 60 +++--- .../heterogeneousArrayAndOverloads.errors.txt | 8 +- .../reference/incompatibleTypes.errors.txt | 40 ++-- ...ritedConstructorWithRestParams2.errors.txt | 24 +-- .../iterableArrayPattern28.errors.txt | 32 ++-- .../iteratorSpreadInArray6.errors.txt | 22 +-- ...attersForSignatureGroupIdentity.errors.txt | 32 ++-- .../baselines/reference/overload1.errors.txt | 12 +- .../reference/overloadResolution.errors.txt | 36 ++-- ...loadResolutionClassConstructors.errors.txt | 12 +- .../overloadResolutionConstructors.errors.txt | 36 ++-- .../overloadResolutionTest1.errors.txt | 36 ++-- .../overloadingOnConstants2.errors.txt | 12 +- ...nWithConstraintCheckingDeferred.errors.txt | 26 +-- .../overloadsWithProvisionalErrors.errors.txt | 24 +-- .../reference/promiseTypeInference.errors.txt | 24 +-- .../recursiveFunctionTypes.errors.txt | 16 +- ...edSignatureAsCallbackParameter1.errors.txt | 32 ++-- ...eStringsWithOverloadResolution1.errors.txt | 48 ++--- ...ingsWithOverloadResolution1_ES6.errors.txt | 48 ++--- ...eStringsWithOverloadResolution3.errors.txt | 36 ++-- ...ingsWithOverloadResolution3_ES6.errors.txt | 36 ++-- .../tsxElementResolution9.errors.txt | 36 ++-- ...elessFunctionComponentOverload4.errors.txt | 174 +++++++++--------- ...elessFunctionComponentOverload5.errors.txt | 70 +++---- ...ionComponentsWithTypeArguments4.errors.txt | 38 ++-- .../unionTypeCallSignatures.errors.txt | 24 +-- .../unionTypeConstructSignatures.errors.txt | 24 +-- 36 files changed, 628 insertions(+), 628 deletions(-) diff --git a/tests/baselines/reference/bigintWithLib.errors.txt b/tests/baselines/reference/bigintWithLib.errors.txt index 19dc04b17fe..3cb6306a1e0 100644 --- a/tests/baselines/reference/bigintWithLib.errors.txt +++ b/tests/baselines/reference/bigintWithLib.errors.txt @@ -1,5 +1,5 @@ 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 overload matches this call. +tests/cases/compiler/bigintWithLib.ts(16,15): error TS2763: No overload matches this call. Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. @@ -15,7 +15,7 @@ tests/cases/compiler/bigintWithLib.ts(16,15): error TS2755: No overload matches 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] 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 overload matches this call. +tests/cases/compiler/bigintWithLib.ts(28,16): error TS2763: No overload matches this call. Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. Argument of type 'number[]' is not assignable to parameter of type 'number'. Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. @@ -48,21 +48,21 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. -!!! error TS2755: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2755: Type '() => IterableIterator' is not assignable to type '() => Iterator'. -!!! error TS2755: Type 'IterableIterator' is not assignable to type 'Iterator'. -!!! error TS2755: Types of property 'next' are incompatible. -!!! error TS2755: Type '(value?: any) => IteratorResult' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2755: Type 'IteratorResult' is not assignable to type 'IteratorResult'. -!!! error TS2755: Type 'number' is not assignable to type 'bigint'. -!!! error TS2755: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigInt64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. -!!! error TS2755: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(length?: number): BigInt64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(array: Iterable): BigInt64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. +!!! error TS2763: Types of property '[Symbol.iterator]' are incompatible. +!!! error TS2763: Type '() => IterableIterator' is not assignable to type '() => Iterator'. +!!! error TS2763: Type 'IterableIterator' is not assignable to type 'Iterator'. +!!! error TS2763: Types of property 'next' are incompatible. +!!! error TS2763: Type '(value?: any) => IteratorResult' is not assignable to type '(value?: any) => IteratorResult'. +!!! error TS2763: Type 'IteratorResult' is not assignable to type 'IteratorResult'. +!!! error TS2763: Type 'number' is not assignable to type 'bigint'. +!!! error TS2763: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigInt64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. +!!! error TS2763: Type 'number[]' is missing the following properties from type 'SharedArrayBuffer': byteLength, [Symbol.species], [Symbol.toStringTag] bigIntArray = new BigInt64Array(new ArrayBuffer(80)); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8); bigIntArray = new BigInt64Array(new ArrayBuffer(80), 8, 3); @@ -78,14 +78,14 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. -!!! error TS2755: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigUint64Array', gave the following error. -!!! error TS2755: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. -!!! error TS2755: Type 'number[]' is not assignable to type 'SharedArrayBuffer'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(length?: number): BigUint64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(array: Iterable): BigUint64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'Iterable'. +!!! error TS2763: Overload 3 of 3, '(buffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): BigUint64Array', gave the following error. +!!! error TS2763: Argument of type 'number[]' is not assignable to parameter of type 'ArrayBuffer | SharedArrayBuffer'. +!!! error TS2763: Type 'number[]' is not assignable to type 'SharedArrayBuffer'. bigUintArray = new BigUint64Array(new ArrayBuffer(80)); bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8); bigUintArray = new BigUint64Array(new ArrayBuffer(80), 8, 3); diff --git a/tests/baselines/reference/constructorOverloads1.errors.txt b/tests/baselines/reference/constructorOverloads1.errors.txt index 9c2db5b39e6..dd0353bbc0e 100644 --- a/tests/baselines/reference/constructorOverloads1.errors.txt +++ b/tests/baselines/reference/constructorOverloads1.errors.txt @@ -2,12 +2,12 @@ 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 overload matches this call. +tests/cases/compiler/constructorOverloads1.ts(16,10): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): Foo', gave the following error. Argument of type 'Foo' is not assignable to parameter of type 'string'. Overload 2 of 2, '(n: number): Foo', gave the following error. Argument of type 'Foo' is not assignable to parameter of type 'number'. -tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2755: No overload matches this call. +tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): Foo', gave the following error. Argument of type 'any[]' is not assignable to parameter of type 'string'. Overload 2 of 2, '(n: number): Foo', gave the following error. @@ -44,18 +44,18 @@ tests/cases/compiler/constructorOverloads1.ts(17,10): error TS2755: No overload var f2 = new Foo(0); var f3 = new Foo(f1); ~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): Foo', gave the following error. -!!! error TS2755: Argument of type 'Foo' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number): Foo', gave the following error. -!!! error TS2755: Argument of type 'Foo' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): Foo', gave the following error. +!!! error TS2763: Argument of type 'Foo' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number): Foo', gave the following error. +!!! error TS2763: Argument of type 'Foo' is not assignable to parameter of type 'number'. var f4 = new Foo([f1,f2,f3]); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): Foo', gave the following error. -!!! error TS2755: Argument of type 'any[]' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number): Foo', gave the following error. -!!! error TS2755: Argument of type 'any[]' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): Foo', gave the following error. +!!! error TS2763: Argument of type 'any[]' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number): Foo', gave the following error. +!!! error TS2763: Argument of type 'any[]' is not assignable to parameter of type 'number'. f1.bar1(); f1.bar2(); diff --git a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt index 28aa026b11f..e09d3c59572 100644 --- a/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt +++ b/tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt @@ -1,25 +1,25 @@ -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(27,12): error TS2763: No overload matches this call. 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'. 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'. -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(28,12): error TS2763: No overload matches this call. 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'. 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'. -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(29,12): error TS2763: No overload matches this call. 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'. 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'. -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(30,12): error TS2763: No overload matches this call. 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'. @@ -61,40 +61,40 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. const b2 = {console.log(k)}} extra />; // k has type "left" | "right" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. const b3 = ; // goTo has type"home" | "contact" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type '{ extra: true; goTo: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type '{ extra: true; goTo: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type '{ extra: true; goTo: "home"; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. const b4 = ; // goTo has type "home" | "contact" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type '{ goTo: string; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Property 'goTo' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type '{ goTo: string; extra: true; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Property 'goTo' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Overload 2 of 2, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'. export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined } const c1 = {console.log(k)}}} extra />; // k has type any diff --git a/tests/baselines/reference/controlFlowIterationErrors.errors.txt b/tests/baselines/reference/controlFlowIterationErrors.errors.txt index b8c4c21906c..4fe96c97dd3 100644 --- a/tests/baselines/reference/controlFlowIterationErrors.errors.txt +++ b/tests/baselines/reference/controlFlowIterationErrors.errors.txt @@ -2,14 +2,14 @@ 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 overload matches this call. +tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(34,13): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error TS2755: No overload matches this call. +tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error TS2763: No overload matches this call. 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'. @@ -60,13 +60,13 @@ tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error while (cond) { x = foo(x); ~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(x: string): number', gave the following error. -!!! error TS2755: Argument of type 'string | number' is not assignable to parameter of type 'string'. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(x: number): string', gave the following error. -!!! error TS2755: Argument of type 'string | number' is not assignable to parameter of type 'number'. -!!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(x: string): number', gave the following error. +!!! error TS2763: Argument of type 'string | number' is not assignable to parameter of type 'string'. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(x: number): string', gave the following error. +!!! error TS2763: Argument of type 'string | number' is not assignable to parameter of type 'number'. +!!! error TS2763: Type 'string' is not assignable to type 'number'. x; } x; @@ -79,13 +79,13 @@ tests/cases/conformance/controlFlow/controlFlowIterationErrors.ts(45,13): error x; x = foo(x); ~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(x: string): number', gave the following error. -!!! error TS2755: Argument of type 'string | number' is not assignable to parameter of type 'string'. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(x: number): string', gave the following error. -!!! error TS2755: Argument of type 'string | number' is not assignable to parameter of type 'number'. -!!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(x: string): number', gave the following error. +!!! error TS2763: Argument of type 'string | number' is not assignable to parameter of type 'string'. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(x: number): string', gave the following error. +!!! error TS2763: Argument of type 'string | number' is not assignable to parameter of type 'number'. +!!! error TS2763: Type 'string' is not assignable to type 'number'. } x; } diff --git a/tests/baselines/reference/for-of39.errors.txt b/tests/baselines/reference/for-of39.errors.txt index 77f8bff4412..364f225e497 100644 --- a/tests/baselines/reference/for-of39.errors.txt +++ b/tests/baselines/reference/for-of39.errors.txt @@ -1,4 +1,4 @@ -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,11): error TS2763: No overload matches this call. 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. @@ -18,21 +18,21 @@ tests/cases/conformance/es6/for-ofStatements/for-of39.ts(1,11): error TS2755: No ==== tests/cases/conformance/es6/for-ofStatements/for-of39.ts (1 errors) ==== var map = new Map([["", true], ["", 0]]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. -!!! error TS2755: Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'Iterable'. -!!! error TS2755: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2755: Type '() => IterableIterator<[string, number] | [string, true]>' is not assignable to type '() => Iterator'. -!!! error TS2755: Type 'IterableIterator<[string, number] | [string, true]>' is not assignable to type 'Iterator'. -!!! error TS2755: Types of property 'next' are incompatible. -!!! error TS2755: Type '(value?: any) => IteratorResult<[string, number] | [string, true]>' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2755: Type 'IteratorResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult'. -!!! error TS2755: Type '[string, number] | [string, true]' is not assignable to type 'readonly [string, boolean]'. -!!! error TS2755: Type '[string, number]' is not assignable to type 'readonly [string, boolean]'. -!!! error TS2755: Types of property '1' are incompatible. -!!! error TS2755: Type 'number' is not assignable to type 'boolean'. -!!! error TS2755: Overload 2 of 3, '(entries?: readonly (readonly [string, boolean])[]): Map', gave the following error. -!!! error TS2755: Type 'number' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. +!!! error TS2763: Argument of type '([string, number] | [string, true])[]' is not assignable to parameter of type 'Iterable'. +!!! error TS2763: Types of property '[Symbol.iterator]' are incompatible. +!!! error TS2763: Type '() => IterableIterator<[string, number] | [string, true]>' is not assignable to type '() => Iterator'. +!!! error TS2763: Type 'IterableIterator<[string, number] | [string, true]>' is not assignable to type 'Iterator'. +!!! error TS2763: Types of property 'next' are incompatible. +!!! error TS2763: Type '(value?: any) => IteratorResult<[string, number] | [string, true]>' is not assignable to type '(value?: any) => IteratorResult'. +!!! error TS2763: Type 'IteratorResult<[string, number] | [string, true]>' is not assignable to type 'IteratorResult'. +!!! error TS2763: Type '[string, number] | [string, true]' is not assignable to type 'readonly [string, boolean]'. +!!! error TS2763: Type '[string, number]' is not assignable to type 'readonly [string, boolean]'. +!!! error TS2763: Types of property '1' are incompatible. +!!! error TS2763: Type 'number' is not assignable to type 'boolean'. +!!! error TS2763: Overload 2 of 3, '(entries?: readonly (readonly [string, boolean])[]): Map', gave the following error. +!!! error TS2763: Type 'number' is not assignable to type 'boolean'. for (var [k, v] of map) { k; v; diff --git a/tests/baselines/reference/functionOverloads2.errors.txt b/tests/baselines/reference/functionOverloads2.errors.txt index 785844037fa..e07242a9c0d 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 overload matches this call. +tests/cases/compiler/functionOverloads2.ts(4,9): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: string): string', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. Overload 2 of 2, '(bar: number): number', gave the following error. @@ -11,8 +11,8 @@ tests/cases/compiler/functionOverloads2.ts(4,9): error TS2755: No overload match function foo(bar: any): any { return bar }; var x = foo(true); ~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: string): string', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(bar: number): number', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: string): string', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(bar: number): number', gave the following error. +!!! error TS2763: 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 ce7472e1936..e3e7d3a25e7 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 overload matches this call. +tests/cases/compiler/functionOverloads40.ts(4,9): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Type 'string' is not assignable to type 'number'. Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. @@ -11,9 +11,9 @@ tests/cases/compiler/functionOverloads40.ts(4,9): error TS2755: No overload matc function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{a:'bar'}]); ~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! error TS2763: 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 a26840f22f0..f475095fdb9 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 overload matches this call. +tests/cases/compiler/functionOverloads41.ts(4,9): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Property 'a' is missing in type '{}' but required in type '{ a: number; }'. Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. @@ -11,9 +11,9 @@ tests/cases/compiler/functionOverloads41.ts(4,9): error TS2755: No overload matc function foo(bar:{a:any;}[]):any{ return bar } var x = foo([{}]); ~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. -!!! error TS2755: Property 'a' is missing in type '{}' but required in type '{ a: number; }'. -!!! error TS2755: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. -!!! error TS2755: Property 'a' is missing in type '{}' but required in type '{ a: boolean; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2763: Property 'a' is missing in type '{}' but required in type '{ a: number; }'. +!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! error TS2763: 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 10673021477..bc4ecd03fdb 100644 --- a/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt +++ b/tests/baselines/reference/genericCallToOverloadedMethodWithOverloadedArguments.errors.txt @@ -1,7 +1,7 @@ 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 overload matches this call. +tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverloadedMethodWithOverloadedArguments.ts(52,22): error TS2763: No overload matches this call. 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'. @@ -9,7 +9,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl 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'. -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(68,22): error TS2763: No overload matches this call. 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'. @@ -20,7 +20,7 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl 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'. -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(84,22): error TS2763: No overload matches this call. 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'. @@ -88,14 +88,14 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. } ////////////////////////////////////// @@ -113,17 +113,17 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(cb: (x: number) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 3, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2755: Overload 3 of 3, '(cb: (x: number) => Promise, error?: (error: any) => string, progress?: (preservation: any) => void): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 3, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: Overload 3 of 3, '(cb: (x: number) => Promise, error?: (error: any) => string, progress?: (preservation: any) => void): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. } ////////////////////////////////////// @@ -141,13 +141,13 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallToOverl var numPromise: Promise; var newPromise = numPromise.then(testFunction); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. -!!! error TS2755: Type 'number' is not assignable to type 'boolean'. -!!! error TS2755: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. -!!! error TS2755: Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. -!!! error TS2755: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(cb: (x: number) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. +!!! error TS2763: Type 'number' is not assignable to type 'boolean'. +!!! error TS2763: Overload 2 of 2, '(cb: (x: number) => Promise, error?: (error: any) => Promise): Promise', gave the following error. +!!! error TS2763: Argument of type '{ (n: number): Promise; (s: string): Promise; (b: boolean): Promise; }' is not assignable to parameter of type '(x: number) => Promise'. +!!! error TS2763: Type 'Promise' is not assignable to type 'Promise'. } \ No newline at end of file diff --git a/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt b/tests/baselines/reference/heterogeneousArrayAndOverloads.errors.txt index 2f3a813bf85..8b7672c3b24 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 overload matches this call. +tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,9): error TS2763: No overload matches this call. Overload 1 of 2, '(arg1: number[]): any', gave the following error. Type 'string' is not assignable to type 'number'. @@ -14,8 +14,8 @@ tests/cases/compiler/heterogeneousArrayAndOverloads.ts(9,9): error TS2755: No ov this.test([]); this.test([1, 2, "hi", 5]); // Error ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(arg1: number[]): any', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(arg1: number[]): any', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'number'. } } \ No newline at end of file diff --git a/tests/baselines/reference/incompatibleTypes.errors.txt b/tests/baselines/reference/incompatibleTypes.errors.txt index 296b749cce8..eb1496057cc 100644 --- a/tests/baselines/reference/incompatibleTypes.errors.txt +++ b/tests/baselines/reference/incompatibleTypes.errors.txt @@ -9,7 +9,7 @@ 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 overload matches this call. +tests/cases/compiler/incompatibleTypes.ts(42,1): error TS2763: No overload matches this call. 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. @@ -20,7 +20,7 @@ tests/cases/compiler/incompatibleTypes.ts(42,1): error TS2755: No overload match Types of property 'p1' are incompatible. Type '() => string' is not assignable to type '(s: string) => number'. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/incompatibleTypes.ts(49,1): error TS2755: No overload matches this call. +tests/cases/compiler/incompatibleTypes.ts(49,1): error TS2763: No overload matches this call. 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; }'. @@ -92,17 +92,17 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => var c2: C2; if1(c1); ~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(i: IFoo1): void', gave the following error. -!!! error TS2755: Argument of type 'C1' is not assignable to parameter of type 'IFoo1'. -!!! error TS2755: Types of property 'p1' are incompatible. -!!! error TS2755: Type '() => string' is not assignable to type '() => number'. -!!! error TS2755: Type 'string' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(i: IFoo2): void', gave the following error. -!!! error TS2755: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. -!!! error TS2755: Types of property 'p1' are incompatible. -!!! error TS2755: Type '() => string' is not assignable to type '(s: string) => number'. -!!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(i: IFoo1): void', gave the following error. +!!! error TS2763: Argument of type 'C1' is not assignable to parameter of type 'IFoo1'. +!!! error TS2763: Types of property 'p1' are incompatible. +!!! error TS2763: Type '() => string' is not assignable to type '() => number'. +!!! error TS2763: Type 'string' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(i: IFoo2): void', gave the following error. +!!! error TS2763: Argument of type 'C1' is not assignable to parameter of type 'IFoo2'. +!!! error TS2763: Types of property 'p1' are incompatible. +!!! error TS2763: Type '() => string' is not assignable to type '(s: string) => number'. +!!! error TS2763: Type 'string' is not assignable to type 'number'. function of1(n: { a: { a: string; }; b: string; }): number; @@ -111,13 +111,13 @@ tests/cases/compiler/incompatibleTypes.ts(74,5): error TS2322: Type '(a: any) => of1({ e: 0, f: 0 }); ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: { a: { a: string; }; b: string; }): number', gave the following error. -!!! error TS2755: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ a: { a: string; }; b: string; }'. -!!! error TS2755: Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. -!!! error TS2755: Overload 2 of 2, '(s: { c: { b: string; }; d: string; }): string', gave the following error. -!!! error TS2755: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. -!!! error TS2755: Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: { a: { a: string; }; b: string; }): number', gave the following error. +!!! error TS2763: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ a: { a: string; }; b: string; }'. +!!! error TS2763: Object literal may only specify known properties, and 'e' does not exist in type '{ a: { a: string; }; b: string; }'. +!!! error TS2763: Overload 2 of 2, '(s: { c: { b: string; }; d: string; }): string', gave the following error. +!!! error TS2763: Argument of type '{ e: number; f: number; }' is not assignable to parameter of type '{ c: { b: string; }; d: string; }'. +!!! error TS2763: Object literal may only specify known properties, and 'e' does not exist in type '{ c: { b: string; }; d: string; }'. interface IMap { [key:string]:string; diff --git a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt index c11826196c4..dcd7912511e 100644 --- a/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt +++ b/tests/baselines/reference/inheritedConstructorWithRestParams2.errors.txt @@ -1,10 +1,10 @@ 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 overload matches this call. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(33,1): error TS2763: No overload matches this call. Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. Argument of type '""' is not assignable to parameter of type 'number'. 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'. -tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,1): error TS2755: No overload matches this call. +tests/cases/compiler/inheritedConstructorWithRestParams2.ts(34,1): error TS2763: No overload matches this call. Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. Argument of type '""' is not assignable to parameter of type 'number'. Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. @@ -48,15 +48,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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. -!!! error TS2755: Argument of type '""' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. -!!! error TS2755: Argument of type '3' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. +!!! error TS2763: Argument of type '""' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. +!!! error TS2763: Argument of type '3' is not assignable to parameter of type 'string'. new Derived("", 3, "", ""); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. -!!! error TS2755: Argument of type '""' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. -!!! error TS2755: Argument of type '3' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(x: string, ...y: number[]): Derived', gave the following error. +!!! error TS2763: Argument of type '""' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(x1: string, x2: string, ...y: number[]): Derived', gave the following error. +!!! error TS2763: 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 2591d3f9ef7..1d7a98f24cb 100644 --- a/tests/baselines/reference/iterableArrayPattern28.errors.txt +++ b/tests/baselines/reference/iterableArrayPattern28.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error TS2755: No overload matches this call. +tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error TS2763: No overload matches this call. 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. @@ -19,18 +19,18 @@ tests/cases/conformance/es6/destructuring/iterableArrayPattern28.ts(2,24): error function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]: [string, number][]) { } takeFirstTwoEntries(...new Map([["", 0], ["hello", true]])); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. -!!! error TS2755: Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'Iterable'. -!!! error TS2755: Types of property '[Symbol.iterator]' are incompatible. -!!! error TS2755: Type '() => IterableIterator<[string, number] | [string, boolean]>' is not assignable to type '() => Iterator'. -!!! error TS2755: Type 'IterableIterator<[string, number] | [string, boolean]>' is not assignable to type 'Iterator'. -!!! error TS2755: Types of property 'next' are incompatible. -!!! error TS2755: Type '(value?: any) => IteratorResult<[string, number] | [string, boolean]>' is not assignable to type '(value?: any) => IteratorResult'. -!!! error TS2755: Type 'IteratorResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult'. -!!! error TS2755: Type '[string, number] | [string, boolean]' is not assignable to type 'readonly [string, number]'. -!!! error TS2755: Type '[string, boolean]' is not assignable to type 'readonly [string, number]'. -!!! error TS2755: Types of property '1' are incompatible. -!!! error TS2755: Type 'boolean' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 3, '(entries?: readonly (readonly [string, number])[]): Map', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'number'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(iterable: Iterable): Map', gave the following error. +!!! error TS2763: Argument of type '([string, number] | [string, boolean])[]' is not assignable to parameter of type 'Iterable'. +!!! error TS2763: Types of property '[Symbol.iterator]' are incompatible. +!!! error TS2763: Type '() => IterableIterator<[string, number] | [string, boolean]>' is not assignable to type '() => Iterator'. +!!! error TS2763: Type 'IterableIterator<[string, number] | [string, boolean]>' is not assignable to type 'Iterator'. +!!! error TS2763: Types of property 'next' are incompatible. +!!! error TS2763: Type '(value?: any) => IteratorResult<[string, number] | [string, boolean]>' is not assignable to type '(value?: any) => IteratorResult'. +!!! error TS2763: Type 'IteratorResult<[string, number] | [string, boolean]>' is not assignable to type 'IteratorResult'. +!!! error TS2763: Type '[string, number] | [string, boolean]' is not assignable to type 'readonly [string, number]'. +!!! error TS2763: Type '[string, boolean]' is not assignable to type 'readonly [string, number]'. +!!! error TS2763: Types of property '1' are incompatible. +!!! error TS2763: Type 'boolean' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 3, '(entries?: readonly (readonly [string, number])[]): Map', gave the following error. +!!! error TS2763: 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 b3ce072c8e4..7a3695df7e3 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 overload matches this call. +tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,1): error TS2763: No overload matches this call. 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. @@ -27,13 +27,13 @@ tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(15,1): error TS2755 var array: number[] = [0, 1]; array.concat([...new SymbolIterator]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(...items: ConcatArray[]): number[]', gave the following error. -!!! error TS2755: Argument of type 'symbol[]' is not assignable to parameter of type 'ConcatArray'. -!!! error TS2755: Types of property 'slice' are incompatible. -!!! error TS2755: Type '(start?: number, end?: number) => symbol[]' is not assignable to type '(start?: number, end?: number) => number[]'. -!!! error TS2755: Type 'symbol[]' is not assignable to type 'number[]'. -!!! error TS2755: Type 'symbol' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(...items: (number | ConcatArray)[]): number[]', gave the following error. -!!! error TS2755: Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray'. -!!! error TS2755: Type 'symbol[]' is not assignable to type 'ConcatArray'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(...items: ConcatArray[]): number[]', gave the following error. +!!! error TS2763: Argument of type 'symbol[]' is not assignable to parameter of type 'ConcatArray'. +!!! error TS2763: Types of property 'slice' are incompatible. +!!! error TS2763: Type '(start?: number, end?: number) => symbol[]' is not assignable to type '(start?: number, end?: number) => number[]'. +!!! error TS2763: Type 'symbol[]' is not assignable to type 'number[]'. +!!! error TS2763: Type 'symbol' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(...items: (number | ConcatArray)[]): number[]', gave the following error. +!!! error TS2763: Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray'. +!!! error TS2763: 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 3365a92b749..da785d6b8eb 100644 --- a/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt +++ b/tests/baselines/reference/orderMattersForSignatureGroupIdentity.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS2755: No overload matches this call. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS2763: No overload matches this call. 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; }'. @@ -6,7 +6,7 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(19,1): error TS275 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; }'. 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 overload matches this call. +tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS2763: No overload matches this call. 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; }'. @@ -36,13 +36,13 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS275 v({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. -!!! error TS2755: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. -!!! error TS2755: Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. -!!! error TS2755: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. -!!! error TS2755: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2755: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. +!!! error TS2763: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. +!!! error TS2763: Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. +!!! error TS2763: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. +!!! error TS2763: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. +!!! error TS2763: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. var w: A; var w: C; @@ -52,10 +52,10 @@ tests/cases/compiler/orderMattersForSignatureGroupIdentity.ts(24,1): error TS275 w({ s: "", n: 0 }).toLowerCase(); ~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. -!!! error TS2755: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. -!!! error TS2755: Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. -!!! error TS2755: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. -!!! error TS2755: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. -!!! error TS2755: Object literal may only specify known properties, and 's' does not exist in type '{ n: number; }'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(x: { s: string; }): string', gave the following error. +!!! error TS2763: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ s: string; }'. +!!! error TS2763: Object literal may only specify known properties, and 'n' does not exist in type '{ s: string; }'. +!!! error TS2763: Overload 2 of 2, '(x: { n: number; }): number', gave the following error. +!!! error TS2763: Argument of type '{ s: string; n: number; }' is not assignable to parameter of type '{ n: number; }'. +!!! error TS2763: 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 576ca81fe73..e92f1440618 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 overload matches this call. +tests/cases/compiler/overload1.ts(34,3): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(s1: number, s2: string): number', gave the following error. @@ -57,11 +57,11 @@ tests/cases/compiler/overload1.ts(34,3): error TS2755: No overload matches this !!! error TS2322: Type 'C' is not assignable to type 'string'. z=x.h(2,2); // no match ~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s1: string, s2: number): string', gave the following error. -!!! error TS2755: Argument of type '2' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(s1: number, s2: string): number', gave the following error. -!!! error TS2755: Argument of type '2' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s1: string, s2: number): string', gave the following error. +!!! error TS2763: Argument of type '2' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(s1: number, s2: string): number', gave the following error. +!!! error TS2763: Argument of type '2' is not assignable to parameter of type 'string'. z=x.h("hello",0); // good var v=x.g; diff --git a/tests/baselines/reference/overloadResolution.errors.txt b/tests/baselines/reference/overloadResolution.errors.txt index d2c21b4ea7b..bb4952cef67 100644 --- a/tests/baselines/reference/overloadResolution.errors.txt +++ b/tests/baselines/reference/overloadResolution.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(27,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(27,1): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. Overload 2 of 2, '(s: number): number', gave the following error. @@ -8,12 +8,12 @@ tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(63,5): e 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 overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(84,1): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(85,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(85,1): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(n: any, m: string): any', gave the following error. @@ -51,11 +51,11 @@ tests/cases/conformance/expressions/functionCalls/overloadResolution.ts(91,22): // No candidate overloads found fn1({}); // Error ~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): string', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(s: number): number', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): string', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(s: number): number', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments function fn2(s: string, n: number): number; @@ -124,18 +124,18 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: string, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: string, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. fn4(null, true); // Error ~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: any, m: number): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(n: any, m: string): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: any, m: number): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(n: any, m: string): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(f: (n: string) => void): string; diff --git a/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt b/tests/baselines/reference/overloadResolutionClassConstructors.errors.txt index 2eaf7490759..295c219e26e 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 overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstructors.ts(27,1): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): fn1', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. Overload 2 of 2, '(s: number): fn1', gave the following error. @@ -47,11 +47,11 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionClassConstru // No candidate overloads found new fn1({}); // Error ~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): fn1', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(s: number): fn1', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): fn1', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(s: number): fn1', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments class fn2 { diff --git a/tests/baselines/reference/overloadResolutionConstructors.errors.txt b/tests/baselines/reference/overloadResolutionConstructors.errors.txt index c4972bb89eb..0f0468bf630 100644 --- a/tests/baselines/reference/overloadResolutionConstructors.errors.txt +++ b/tests/baselines/reference/overloadResolutionConstructors.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(27,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(27,1): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. Overload 2 of 2, '(s: number): number', gave the following error. @@ -8,12 +8,12 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors 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 overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(91,1): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(92,1): error TS2755: No overload matches this call. +tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors.ts(92,1): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(n: any, m: string): any', gave the following error. @@ -51,11 +51,11 @@ tests/cases/conformance/expressions/functionCalls/overloadResolutionConstructors // No candidate overloads found new fn1({}); // Error ~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): string', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(s: number): number', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): string', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(s: number): number', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'number'. // Generic and non - generic overload where generic overload is the only candidate when called with type arguments interface fn2 { @@ -131,18 +131,18 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: string, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: string, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. new fn4(null, true); // Error ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: any, m: number): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(n: any, m: string): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: any, m: number): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(n: any, m: string): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors interface fn5 { diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index 06050fb2192..ad3b6779be5 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/overloadResolutionTest1.ts(7,12): error TS2755: No overload matches this call. +tests/cases/compiler/overloadResolutionTest1.ts(7,12): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. Type 'string' is not assignable to type 'number'. Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. Type 'string' is not assignable to type 'boolean'. -tests/cases/compiler/overloadResolutionTest1.ts(18,10): error TS2755: No overload matches this call. +tests/cases/compiler/overloadResolutionTest1.ts(18,10): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: { a: number; }): string', gave the following error. Type 'string' is not assignable to type 'number'. Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error. Type 'string' is not assignable to type 'boolean'. -tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No overload matches this call. +tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload matches this call. Overload 1 of 2, '(bar: { a: number; }): number', gave the following error. Type 'true' is not assignable to type 'number'. Overload 2 of 2, '(bar: { a: string; }): string', gave the following error. @@ -24,11 +24,11 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No overload var x11 = foo([{a:0}]); // works var x111 = foo([{a:"s"}]); // error - does not match any signature ~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }[]): string', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }[]): number', gave the following error. +!!! error TS2763: 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 @@ -41,11 +41,11 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No overload var x3 = foo2({a:true}); // works var x4 = foo2({a:"s"}); // error ~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: { a: number; }): string', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }): string', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(bar: { a: boolean; }): number', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'boolean'. function foo4(bar:{a:number;}):number; @@ -53,8 +53,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2755: No overload function foo4(bar:{a:any;}):any{ return bar }; var x = foo4({a:true}); // error ~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(bar: { a: number; }): number', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 2, '(bar: { a: string; }): string', gave the following error. +!!! error TS2763: 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 aafe28250ad..e252ebc8d69 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 overload matches this call. +tests/cases/compiler/overloadingOnConstants2.ts(15,9): error TS2763: No overload matches this call. 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"'. Overload 2 of 2, '(x: "bye", items: string[]): E', gave the following error. @@ -27,11 +27,11 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(x: "hi", items: string[]): D', gave the following error. -!!! error TS2755: Argument of type '"um"' is not assignable to parameter of type '"hi"'. -!!! error TS2755: Overload 2 of 2, '(x: "bye", items: string[]): E', gave the following error. -!!! error TS2755: Argument of type '"um"' is not assignable to parameter of type '"bye"'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(x: "hi", items: string[]): D', gave the following error. +!!! error TS2763: Argument of type '"um"' is not assignable to parameter of type '"hi"'. +!!! error TS2763: Overload 2 of 2, '(x: "bye", items: string[]): E', gave the following error. +!!! error TS2763: Argument of type '"um"' is not assignable to parameter of type '"bye"'. //function bar(x: "hi", items: string[]): D; diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index 75688b0d459..e6f568f0d29 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 overload matches this call. +tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(18,23): error TS2763: No overload matches this call. 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'. @@ -56,16 +56,16 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): ~~~~~~~~~~~~~ }); ~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. -!!! error TS2755: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: D) => number'. -!!! error TS2755: Type 'G' is not assignable to type 'number'. -!!! error TS2755: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. -!!! error TS2755: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. -!!! error TS2755: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2755: Property 'q' is missing in type 'C' but required in type 'D'. -!!! error TS2755: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. -!!! error TS2755: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. -!!! error TS2755: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2755: Property 'q' is missing in type 'B' but required in type 'D'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(arg: (x: D) => number): string', gave the following error. +!!! error TS2763: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: D) => number'. +!!! error TS2763: Type 'G' is not assignable to type 'number'. +!!! error TS2763: Overload 2 of 3, '(arg: (x: C) => any): string', gave the following error. +!!! error TS2763: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: C) => any'. +!!! error TS2763: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2763: Property 'q' is missing in type 'C' but required in type 'D'. +!!! error TS2763: Overload 3 of 3, '(arg: (x: B) => any): number', gave the following error. +!!! error TS2763: Argument of type '(x: D) => G' is not assignable to parameter of type '(x: B) => any'. +!!! error TS2763: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2763: Property 'q' is missing in type 'B' but required in type 'D'. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 3bdc2092e9f..0c9a607b13c 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,1): error TS2755: No overload matches this call. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(6,1): error TS2763: No overload matches this call. Overload 1 of 2, '(s: string): number', gave the following error. Argument of type '(s: string) => {}' is not assignable to parameter of type 'string'. 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 tests/cases/compiler/overloadsWithProvisionalErrors.ts(7,17): error TS2304: Cannot find name 'blah'. -tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,1): error TS2755: No overload matches this call. +tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,1): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. @@ -20,20 +20,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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): number', gave the following error. -!!! error TS2755: Argument of type '(s: string) => {}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. -!!! error TS2755: Type '{}' is missing the following properties from type '{ a: number; b: number; }': a, b +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): number', gave the following error. +!!! error TS2763: Argument of type '(s: string) => {}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. +!!! error TS2763: 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(s: string): number', gave the following error. -!!! error TS2755: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. -!!! error TS2755: Property 'b' is missing in type '{ a: any; }' but required in type '{ a: number; b: number; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(s: string): number', gave the following error. +!!! error TS2763: Argument of type '(s: string) => { a: any; }' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(lambda: (s: string) => { a: number; b: number; }): string', gave the following error. +!!! error TS2763: 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/promiseTypeInference.errors.txt b/tests/baselines/reference/promiseTypeInference.errors.txt index c2f3c51f0ec..9207b909984 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 overload matches this call. +tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(onfulfilled?: (value: string) => number | PromiseLike, onrejected?: (reason: any) => PromiseLike): Promise', gave the following error. @@ -23,15 +23,15 @@ tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2755: No overload m var $$x = load("something").then(s => convert(s)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(success?: (value: string) => Promise): Promise', gave the following error. -!!! error TS2755: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. -!!! error TS2755: Overload 2 of 2, '(onfulfilled?: (value: string) => number | PromiseLike, onrejected?: (reason: any) => PromiseLike): Promise', gave the following error. -!!! error TS2755: Type 'IPromise' is not assignable to type 'number | PromiseLike'. -!!! error TS2755: Type 'IPromise' is not assignable to type 'PromiseLike'. -!!! error TS2755: Types of property 'then' are incompatible. -!!! error TS2755: Type '(success?: (value: number) => IPromise) => IPromise' is not assignable to type '(onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. -!!! error TS2755: Types of parameters 'success' and 'onfulfilled' are incompatible. -!!! error TS2755: Type 'TResult1 | PromiseLike' is not assignable to type 'IPromise'. -!!! error TS2755: Type 'TResult1' is not assignable to type 'IPromise'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(success?: (value: string) => Promise): Promise', gave the following error. +!!! error TS2763: Property 'catch' is missing in type 'IPromise' but required in type 'Promise'. +!!! error TS2763: Overload 2 of 2, '(onfulfilled?: (value: string) => number | PromiseLike, onrejected?: (reason: any) => PromiseLike): Promise', gave the following error. +!!! error TS2763: Type 'IPromise' is not assignable to type 'number | PromiseLike'. +!!! error TS2763: Type 'IPromise' is not assignable to type 'PromiseLike'. +!!! error TS2763: Types of property 'then' are incompatible. +!!! error TS2763: Type '(success?: (value: number) => IPromise) => IPromise' is not assignable to type '(onfulfilled?: (value: number) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. +!!! error TS2763: Types of parameters 'success' and 'onfulfilled' are incompatible. +!!! error TS2763: Type 'TResult1 | PromiseLike' is not assignable to type 'IPromise'. +!!! error TS2763: Type 'TResult1' is not assignable to type 'IPromise'. \ No newline at end of file diff --git a/tests/baselines/reference/recursiveFunctionTypes.errors.txt b/tests/baselines/reference/recursiveFunctionTypes.errors.txt index 2a473c2d22f..a0dd30498aa 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 overload matches this call. +tests/cases/compiler/recursiveFunctionTypes.ts(43,1): error TS2763: No overload matches this call. 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; }'. Overload 2 of 4, '(a: number): number', gave the following error. @@ -91,11 +91,11 @@ tests/cases/compiler/recursiveFunctionTypes.ts(43,1): error TS2755: No overload !!! error TS2554: Expected 0-1 arguments, but got 2. f7(""); // ok (function takes an any param) ~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: 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: Argument of type '""' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. -!!! error TS2755: Overload 2 of 4, '(a: number): number', gave the following error. -!!! error TS2755: Argument of type '""' is not assignable to parameter of type 'number'. -!!! error TS2755: 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. -!!! error TS2755: Argument of type '""' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: 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 TS2763: Argument of type '""' is not assignable to parameter of type '{ (): typeof f7; (a: typeof f7): () => number; (a: number): number; (a?: typeof f7): typeof f7; }'. +!!! error TS2763: Overload 2 of 4, '(a: number): number', gave the following error. +!!! error TS2763: Argument of type '""' is not assignable to parameter of type 'number'. +!!! error TS2763: 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. +!!! error TS2763: 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 e1a2004542c..eb6f115089e 100644 --- a/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt +++ b/tests/baselines/reference/specializedSignatureAsCallbackParameter1.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(7,1): error TS2755: No overload matches this call. +tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(7,1): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2755: No overload matches this call. +tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2763: No overload matches this call. 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. @@ -23,19 +23,19 @@ tests/cases/compiler/specializedSignatureAsCallbackParameter1.ts(8,1): error TS2 // both are errors x3(1, (x: string) => 1); ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. -!!! error TS2755: Argument of type '(x: string) => number' is not assignable to parameter of type '(x: number) => number'. -!!! error TS2755: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. -!!! error TS2755: Argument of type '1' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. +!!! error TS2763: Argument of type '(x: string) => number' is not assignable to parameter of type '(x: number) => number'. +!!! error TS2763: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. +!!! error TS2763: Argument of type '1' is not assignable to parameter of type 'string'. x3(1, (x: 'hm') => 1); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. -!!! error TS2755: Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. -!!! error TS2755: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2755: Type 'number' is not assignable to type '"hm"'. -!!! error TS2755: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. -!!! error TS2755: Argument of type '1' is not assignable to parameter of type 'string'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number, cb: (x: number) => number): any', gave the following error. +!!! error TS2763: Argument of type '(x: "hm") => number' is not assignable to parameter of type '(x: number) => number'. +!!! error TS2763: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2763: Type 'number' is not assignable to type '"hm"'. +!!! error TS2763: Overload 2 of 2, '(a: string, cb: (x: number) => number): any', gave the following error. +!!! error TS2763: Argument of type '1' is not assignable to parameter of type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt index 541a327b311..30cd75338e6 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1.errors.txt @@ -1,23 +1,23 @@ 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(11,9): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(12,9): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(13,9): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(13,9): error TS2763: No overload matches this call. 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'. 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'. 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1.ts(19,9): error TS2763: No overload matches this call. 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'. Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. @@ -44,25 +44,25 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) ~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} ~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~ !!! error TS2554: Expected 1-3 arguments, but got 4. @@ -72,11 +72,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var w = foo `${1}${2}`; // boolean var x = foo `${1}${true}`; // boolean (with error) ~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: 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 409cf9fb676..d2c259d125b 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution1_ES6.errors.txt @@ -1,23 +1,23 @@ 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(11,9): error TS2763: No overload matches this call. 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'. 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'. -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(12,9): error TS2763: No overload matches this call. 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'. 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'. -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(13,9): error TS2763: No overload matches this call. 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'. 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'. 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution1_ES6.ts(19,9): error TS2763: No overload matches this call. 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'. Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. @@ -44,25 +44,25 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var d = foo([], 1, true); // boolean (with error) ~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var e = foo([], 1, "2"); // {} ~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: Argument of type 'undefined[]' is not assignable to parameter of type 'TemplateStringsArray'. var f = foo([], 1, 2, 3); // any (with error) ~ !!! error TS2554: Expected 1-3 arguments, but got 4. @@ -72,11 +72,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio var w = foo `${1}${2}`; // boolean var x = foo `${1}${true}`; // boolean (with error) ~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 4, '(strs: TemplateStringsArray, x: number, y: number): boolean', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 4, '(strs: TemplateStringsArray, x: number, y: string): {}', gave the following error. +!!! error TS2763: 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 1432360eba8..12fd697fc67 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(9,1): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(9,1): error TS2763: No overload matches this call. Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. Argument of type '{}' is not assignable to parameter of type 'number'. 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(62,1): error TS2763: No overload matches this call. 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'. 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'. -tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(63,1): error TS2755: No overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3.ts(63,1): error TS2763: No overload matches this call. 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'. Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. @@ -29,11 +29,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // No candidate overloads found fn1 `${ {} }`; // Error ~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'number'. function fn2(strs: TemplateStringsArray, s: string, n: number): number; function fn2(strs: TemplateStringsArray, n: number, t: T): T; @@ -93,18 +93,18 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. fn4 `${ null }${ true }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(strs: TemplateStringsArray, f: (n: string) => void): string; diff --git a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt index c3b049af05f..312f22e0e71 100644 --- a/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt +++ b/tests/baselines/reference/taggedTemplateStringsWithOverloadResolution3_ES6.errors.txt @@ -1,16 +1,16 @@ -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(9,1): error TS2763: No overload matches this call. Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. Argument of type '{}' is not assignable to parameter of type 'string'. Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. Argument of type '{}' is not assignable to parameter of type 'number'. 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 overload matches this call. +tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolution3_ES6.ts(62,1): error TS2763: No overload matches this call. 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'. 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'. -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(63,1): error TS2763: No overload matches this call. 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'. Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. @@ -29,11 +29,11 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithOverloadResolutio // No candidate overloads found fn1 `${ {} }`; // Error ~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. -!!! error TS2755: Argument of type '{}' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error. +!!! error TS2763: Argument of type '{}' is not assignable to parameter of type 'number'. function fn2(strs: TemplateStringsArray, s: string, n: number): number; function fn2(strs: TemplateStringsArray, n: number, t: T): T; @@ -93,18 +93,18 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. -!!! error TS2755: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: any): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. fn4 `${ null }${ true }`; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(strs: TemplateStringsArray, n: any, m: number): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 3, '(strs: TemplateStringsArray, n: any, m: string): any', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. // Non - generic overloads where contextual typing of function arguments has errors function fn5(strs: TemplateStringsArray, f: (n: string) => void): string; diff --git a/tests/baselines/reference/tsxElementResolution9.errors.txt b/tests/baselines/reference/tsxElementResolution9.errors.txt index 37a847d0126..3aa151d7f5d 100644 --- a/tests/baselines/reference/tsxElementResolution9.errors.txt +++ b/tests/baselines/reference/tsxElementResolution9.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/jsx/file.tsx(11,1): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(11,1): error TS2763: No overload matches this call. Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{}' is not assignable to type 'string'. Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. -tests/cases/conformance/jsx/file.tsx(18,1): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(18,1): error TS2763: No overload matches this call. Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{}' is not assignable to type 'string'. Overload 2 of 2, '(n: number): { y: string; }', gave the following error. Type '{}' is not assignable to type 'number'. -tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(25,1): error TS2763: No overload matches this call. Overload 1 of 2, '(n: string): { x: number; }', gave the following error. Type '{ x: number; }' is not assignable to type 'string'. Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error. @@ -28,11 +28,11 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No overload matches th var Obj1: Obj1; ; // Error, return type is not an object type ~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. -!!! error TS2755: Type '{}' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. -!!! error TS2755: Type '{}' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2763: Type '{}' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. +!!! error TS2763: Type '{}' is not assignable to type 'number'. interface Obj2 { (n: string): { x: number }; @@ -41,11 +41,11 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No overload matches th var Obj2: Obj2; ; // Error, return type is not an object type ~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. -!!! error TS2755: Type '{}' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. -!!! error TS2755: Type '{}' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2763: Type '{}' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number): { y: string; }', gave the following error. +!!! error TS2763: Type '{}' is not assignable to type 'number'. interface Obj3 { (n: string): { x: number }; @@ -54,9 +54,9 @@ tests/cases/conformance/jsx/file.tsx(25,1): error TS2755: No overload matches th var Obj3: Obj3; ; // OK ~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. -!!! error TS2755: Type '{ x: number; }' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error. -!!! error TS2755: Type '{ x: number; }' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(n: string): { x: number; }', gave the following error. +!!! error TS2763: Type '{ x: number; }' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error. +!!! error TS2763: Type '{ x: number; }' is not assignable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt index bd90b09a12a..c9f17da6254 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt @@ -1,55 +1,55 @@ -tests/cases/conformance/jsx/file.tsx(12,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(12,12): error TS2763: No overload matches this call. 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'. 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; }'. -tests/cases/conformance/jsx/file.tsx(13,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(13,12): error TS2763: No overload matches this call. 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'. 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; }'. -tests/cases/conformance/jsx/file.tsx(14,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(14,12): error TS2763: No overload matches this call. 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'. Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. -tests/cases/conformance/jsx/file.tsx(16,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(16,12): error TS2763: No overload matches this call. 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'. 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; }'. -tests/cases/conformance/jsx/file.tsx(17,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(17,12): error TS2763: No overload matches this call. Overload 1 of 2, '(): Element', gave the following error. Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'. 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'. -tests/cases/conformance/jsx/file.tsx(25,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(25,12): error TS2763: No overload matches this call. Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. 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; }'. -tests/cases/conformance/jsx/file.tsx(26,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(26,12): error TS2763: No overload matches this call. 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; }'. Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. Type 'string' is not assignable to type 'number'. -tests/cases/conformance/jsx/file.tsx(33,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(33,12): error TS2763: No overload matches this call. Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. Type 'true' is not assignable to type 'string'. Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/jsx/file.tsx(34,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(34,12): error TS2763: No overload matches this call. 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; }'. @@ -58,7 +58,7 @@ tests/cases/conformance/jsx/file.tsx(34,12): error TS2755: No overload matches t Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/jsx/file.tsx(35,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(35,12): error TS2763: No overload matches this call. 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; }'. @@ -66,7 +66,7 @@ tests/cases/conformance/jsx/file.tsx(35,12): error TS2755: No overload matches t Type 'string' is not assignable to type 'Element'. Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. Type 'string' is not assignable to type 'boolean'. -tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches this call. 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; }'. @@ -90,48 +90,48 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No overload matches t // Error const c0 = ; // extra property; ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(): Element', gave the following error. -!!! error TS2755: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2755: Property 'extraProp' does not exist on type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. -!!! error TS2755: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. -!!! error TS2755: Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2763: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2763: Property 'extraProp' does not exist on type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! error TS2763: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2763: Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. const c1 = ; // missing property; ~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(): Element', gave the following error. -!!! error TS2755: Type '{ yy: number; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2755: Property 'yy' does not exist on type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. -!!! error TS2755: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2763: Type '{ yy: number; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2763: Property 'yy' does not exist on type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! error TS2763: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'. const c2 = ; // type incompatible; ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(): Element', gave the following error. -!!! error TS2755: Type '{ yy1: true; yy: number; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2755: Property 'yy1' does not exist on type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2763: Type '{ yy1: true; yy: number; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2763: Property 'yy1' does not exist on type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! error TS2763: 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(): Element', gave the following error. -!!! error TS2755: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2755: Property 'y1' does not exist on type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. -!!! error TS2755: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. -!!! error TS2755: Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2763: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2763: Property 'y1' does not exist on type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! error TS2763: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'. +!!! error TS2763: Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'. const c5 = ; // type incompatible; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(): Element', gave the following error. -!!! error TS2755: Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. -!!! error TS2755: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'. -!!! error TS2755: Types of property 'yy' are incompatible. -!!! error TS2755: Type 'boolean' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(): Element', gave the following error. +!!! error TS2763: Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error. +!!! error TS2763: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'. +!!! error TS2763: Types of property 'yy' are incompatible. +!!! error TS2763: Type 'boolean' is not assignable to type 'number'. const c6 = ; // Should error as there is extra attribute that doesn't match any. Current it is not const c7 = ; // Should error as there is extra attribute that doesn't match any. Current it is not @@ -141,19 +141,19 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No overload matches t // Error const d1 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. -!!! error TS2755: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. +!!! error TS2763: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'. const d2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. -!!! error TS2755: Type '{ yy: string; direction: string; }' is not assignable to type 'IntrinsicAttributes & { "extra-data": string; }'. -!!! error TS2755: Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'. -!!! error TS2755: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'number'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error. +!!! error TS2763: Type '{ yy: string; direction: string; }' is not assignable to type 'IntrinsicAttributes & { "extra-data": string; }'. +!!! error TS2763: Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'. +!!! error TS2763: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'number'. declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element; declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element; @@ -162,42 +162,42 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No overload matches t // Error const e1 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. -!!! error TS2755: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'boolean'. const e2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. -!!! error TS2755: Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. -!!! error TS2755: Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. -!!! error TS2755: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. -!!! error TS2755: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2763: Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! error TS2763: Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. +!!! error TS2763: Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'. +!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'boolean'. const e3 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. -!!! error TS2755: Type '{ y1: string; y2: number; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'Element'. -!!! error TS2755: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2763: Type '{ y1: string; y2: number; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'Element'. +!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! error TS2763: Type 'string' is not assignable to type 'boolean'. const e4 = Hi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. -!!! error TS2755: Type '{ children: string; y1: string; y2: number; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. -!!! error TS2755: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. -!!! error TS2755: 'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'. -!!! error TS2755: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. -!!! error TS2755: Type 'string' is not assignable to type 'boolean'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error. +!!! error TS2763: Type '{ children: string; y1: string; y2: number; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'. +!!! error TS2763: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error. +!!! error TS2763: 'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'. +!!! error TS2763: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error. +!!! error TS2763: 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 680f2903b77..214418e3375 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(48,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(48,12): error TS2763: No overload matches this call. 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'. @@ -8,21 +8,21 @@ tests/cases/conformance/jsx/file.tsx(48,12): error TS2755: No overload matches t 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'. -tests/cases/conformance/jsx/file.tsx(54,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(54,12): error TS2763: No overload matches this call. Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/jsx/file.tsx(55,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(55,12): error TS2763: No overload matches this call. Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. Type 'true' is not assignable to type 'string'. -tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(56,12): error TS2763: No overload matches this call. 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'. Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. @@ -81,16 +81,16 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No overload matches t // Error const b0 = {}}>GO; // extra property; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'. -!!! error TS2755: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. -!!! error TS2755: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. -!!! error TS2755: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. -!!! error TS2755: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'. +!!! error TS2763: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'. +!!! error TS2763: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! error TS2763: Type '{ children: string; to: string; onClick: (e: MouseEvent) => void; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'. +!!! error TS2763: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'. const b1 = {}} {...obj0}>Hello world; // extra property; const b2 = ; // extra property const b3 = {}}} />; // extra property @@ -98,28 +98,28 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2755: No overload matches t 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 overload matches this call. -!!! error TS2755: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. -!!! error TS2755: Type 'number' is not assignable to type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! error TS2763: Type 'number' is not assignable to type 'string'. const b7 = ; // incorrect type for optional attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. -!!! error TS2755: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. -!!! error TS2755: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! error TS2763: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! error TS2763: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! error TS2763: Type 'true' is not assignable to type 'string'. const b8 = ; // incorrect type for specified hyphanated name ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. -!!! error TS2755: Property 'onClick' is missing in type '{ data-format: true; }' but required in type 'ButtonProps'. -!!! error TS2755: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. -!!! error TS2755: Property 'to' is missing in type '{ data-format: true; }' but required in type 'LinkProps'. -!!! error TS2755: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. -!!! error TS2755: Type 'true' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error. +!!! error TS2763: Property 'onClick' is missing in type '{ data-format: true; }' but required in type 'ButtonProps'. +!!! error TS2763: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error. +!!! error TS2763: Property 'to' is missing in type '{ data-format: true; }' but required in type 'LinkProps'. +!!! error TS2763: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error. +!!! error TS2763: 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 ea279fdedfb..fffd57b6272 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(9,14): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(9,14): error TS2763: No overload matches this call. 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'. @@ -6,7 +6,7 @@ tests/cases/conformance/jsx/file.tsx(9,14): error TS2755: No overload matches th Type 'number' is not assignable to type 'string'. 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; }'. -tests/cases/conformance/jsx/file.tsx(10,14): error TS2755: No overload matches this call. +tests/cases/conformance/jsx/file.tsx(10,14): error TS2763: No overload matches this call. Overload 1 of 3, '(): Element', gave the following error. Type 'T & { ignore-prop: true; }' has no properties in common with type 'IntrinsicAttributes'. Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. @@ -28,23 +28,23 @@ tests/cases/conformance/jsx/file.tsx(10,14): error TS2755: No overload matches t function Baz(arg1: T, arg2: U) { let a0 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(): Element', gave the following error. -!!! error TS2755: Type '{ a: number; }' is not assignable to type 'IntrinsicAttributes'. -!!! error TS2755: Property 'a' does not exist on type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. -!!! error TS2755: Type 'number' is not assignable to type 'string'. -!!! error TS2755: Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error. -!!! error TS2755: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(): Element', gave the following error. +!!! error TS2763: Type '{ a: number; }' is not assignable to type 'IntrinsicAttributes'. +!!! error TS2763: Property 'a' does not exist on type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. +!!! error TS2763: Type 'number' is not assignable to type 'string'. +!!! error TS2763: Overload 3 of 3, '(attr: { b: unknown; a: number; }): Element', gave the following error. +!!! error TS2763: Property 'b' is missing in type '{ a: number; }' but required in type '{ b: unknown; a: number; }'. let a2 = // missing a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 3, '(): Element', gave the following error. -!!! error TS2755: Type 'T & { ignore-prop: true; }' has no properties in common with type 'IntrinsicAttributes'. -!!! error TS2755: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. -!!! error TS2755: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }'. -!!! error TS2755: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: string; "ignore-prop": boolean; }'. -!!! error TS2755: Overload 3 of 3, '(attr: { b: unknown; a: unknown; }): Element', gave the following error. -!!! error TS2755: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'. -!!! error TS2755: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: unknown; }'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 3, '(): Element', gave the following error. +!!! error TS2763: Type 'T & { ignore-prop: true; }' has no properties in common with type 'IntrinsicAttributes'. +!!! error TS2763: Overload 2 of 3, '(attr: { b: unknown; a: string; "ignore-prop": boolean; }): Element', gave the following error. +!!! error TS2763: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }'. +!!! error TS2763: Property 'a' is missing in type '{ b: number; } & { ignore-prop: true; }' but required in type '{ b: unknown; a: string; "ignore-prop": boolean; }'. +!!! error TS2763: Overload 3 of 3, '(attr: { b: unknown; a: unknown; }): Element', gave the following error. +!!! error TS2763: Type 'T & { ignore-prop: true; }' is not assignable to type 'IntrinsicAttributes & { b: unknown; a: unknown; }'. +!!! error TS2763: 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/unionTypeCallSignatures.errors.txt b/tests/baselines/reference/unionTypeCallSignatures.errors.txt index d842c9b235f..952196e6e02 100644 --- a/tests/baselines/reference/unionTypeCallSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeCallSignatures.errors.txt @@ -1,10 +1,10 @@ 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 overload matches this call. +tests/cases/conformance/types/union/unionTypeCallSignatures.ts(10,1): error TS2763: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -tests/cases/conformance/types/union/unionTypeCallSignatures.ts(15,1): error TS2755: No overload matches this call. +tests/cases/conformance/types/union/unionTypeCallSignatures.ts(15,1): error TS2763: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. Overload 2 of 2, '(a: string): string | boolean', gave the following error. @@ -49,22 +49,22 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number): number | Date', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(a: string): string | boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! error TS2763: 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; }; numOrDate = unionOfDifferentReturnType1(10); strOrBoolean = unionOfDifferentReturnType1("hello"); unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number): number | Date', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(a: string): string | boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. unionOfDifferentReturnType1(); // error missing parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0. diff --git a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt index 5913799605b..cbd108cac27 100644 --- a/tests/baselines/reference/unionTypeConstructSignatures.errors.txt +++ b/tests/baselines/reference/unionTypeConstructSignatures.errors.txt @@ -1,10 +1,10 @@ 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 overload matches this call. +tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(10,1): error TS2763: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. Overload 2 of 2, '(a: string): string | boolean', gave the following error. Argument of type 'true' is not assignable to parameter of type 'string'. -tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(15,1): error TS2755: No overload matches this call. +tests/cases/conformance/types/union/unionTypeConstructSignatures.ts(15,1): error TS2763: No overload matches this call. Overload 1 of 2, '(a: number): number | Date', gave the following error. Argument of type 'true' is not assignable to parameter of type 'number'. Overload 2 of 2, '(a: string): string | boolean', gave the following error. @@ -48,22 +48,22 @@ 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 overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number): number | Date', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(a: string): string | boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! error TS2763: 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; }; numOrDate = new unionOfDifferentReturnType1(10); strOrBoolean = new unionOfDifferentReturnType1("hello"); new unionOfDifferentReturnType1(true); // error in type of parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2755: No overload matches this call. -!!! error TS2755: Overload 1 of 2, '(a: number): number | Date', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'number'. -!!! error TS2755: Overload 2 of 2, '(a: string): string | boolean', gave the following error. -!!! error TS2755: Argument of type 'true' is not assignable to parameter of type 'string'. +!!! error TS2763: No overload matches this call. +!!! error TS2763: Overload 1 of 2, '(a: number): number | Date', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'number'. +!!! error TS2763: Overload 2 of 2, '(a: string): string | boolean', gave the following error. +!!! error TS2763: Argument of type 'true' is not assignable to parameter of type 'string'. new unionOfDifferentReturnType1(); // error missing parameter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2554: Expected 1 arguments, but got 0.