diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index eeb72f42df8..b0fb305d317 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21693,10 +21693,10 @@ namespace ts { i++; } - const related = map( - max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics), - d => typeof d.messageText === "string" ? (d as DiagnosticMessageChain) : d.messageText); - diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(related, Diagnostics.No_overload_matches_this_call))); + const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics); + const chain = map(diags, d => typeof d.messageText === "string" ? (d as DiagnosticMessageChain) : d.messageText); + const related = flatMap(diags, d => (d as Diagnostic).relatedInformation) as DiagnosticRelatedInformation[]; + diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(chain, Diagnostics.No_overload_matches_this_call), related)); } } else if (candidateForArgumentArityError) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 56f11078fc0..33c75a05fce 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -7170,36 +7170,6 @@ namespace ts { return d1.relatedInformation ? Comparison.LessThan : Comparison.GreaterThan; } - // function compareMessageText(t1: string | DiagnosticMessageChain[], t2: string | DiagnosticMessageChain[]): Comparison { - // if (typeof t1 === 'string' && typeof t2 === 'string') { - // return compareStringsCaseSensitive(t1, t2) - // } - // else if (Array.isArray(t1) && Array.isArray(t2)) { - // if (t1.length < t2.length) { - // return Comparison.LessThan; - // } - // else if (t1.length > t2.length) { - // return Comparison.GreaterThan; - // } - // else { - // for (let i = 0; i < t1.length; i++) { - // t1[i].messageText - // const res = cmps(t1[i], t2[i]); - // if (res) { - // return res; - // } - // } - // return Comparison.EqualTo; - // } - // } - // else if (typeof t1 === 'string') { - // return Comparison.LessThan; - // } - // else { - // return Comparison.GreaterThan; - // } - // } - function compareMessageText(t1: string | DiagnosticMessageChain, t2: string | DiagnosticMessageChain): Comparison { if (typeof t1 === "string" && typeof t2 === "string") { return compareStringsCaseSensitive(t1, t2); @@ -7223,16 +7193,19 @@ namespace ts { if (!t2.next) { return Comparison.GreaterThan; } - res = compareValues(t1.next.length, t2.next.length); - if (res) { - return res; - } - for (let i = 0; i < t1.next.length; i++) { + const len = Math.min(t1.next.length, t2.next.length); + for (let i = 0; i < len; i++) { res = compareMessageText(t1.next[i], t2.next[i]); if (res) { return res; } } + if (t1.next.length < t2.next.length) { + return Comparison.LessThan; + } + else if (t1.next.length > t2.next.length) { + return Comparison.GreaterThan; + } return Comparison.EqualTo; } diff --git a/tests/baselines/reference/functionOverloads40.errors.txt b/tests/baselines/reference/functionOverloads40.errors.txt index e3e7d3a25e7..ecfda613f8b 100644 --- a/tests/baselines/reference/functionOverloads40.errors.txt +++ b/tests/baselines/reference/functionOverloads40.errors.txt @@ -16,4 +16,6 @@ tests/cases/compiler/functionOverloads40.ts(4,9): error TS2763: No overload matc !!! 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'. +!!! related TS6500 tests/cases/compiler/functionOverloads40.ts:1:19: The expected type comes from property 'a' which is declared here on type '{ a: number; }' +!!! related TS6500 tests/cases/compiler/functionOverloads40.ts:2:19: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }' \ No newline at end of file diff --git a/tests/baselines/reference/functionOverloads41.errors.txt b/tests/baselines/reference/functionOverloads41.errors.txt index f475095fdb9..1ae82358453 100644 --- a/tests/baselines/reference/functionOverloads41.errors.txt +++ b/tests/baselines/reference/functionOverloads41.errors.txt @@ -16,4 +16,6 @@ tests/cases/compiler/functionOverloads41.ts(4,9): error TS2763: No overload matc !!! 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; }'. +!!! related TS2728 tests/cases/compiler/functionOverloads41.ts:1:19: 'a' is declared here. +!!! related TS2728 tests/cases/compiler/functionOverloads41.ts:2:19: 'a' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/overloadResolutionTest1.errors.txt b/tests/baselines/reference/overloadResolutionTest1.errors.txt index ad3b6779be5..a3e0a1c26a9 100644 --- a/tests/baselines/reference/overloadResolutionTest1.errors.txt +++ b/tests/baselines/reference/overloadResolutionTest1.errors.txt @@ -29,6 +29,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload !!! 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'. +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:1:19: The expected type comes from property 'a' which is declared here on type '{ a: number; }' +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:2:19: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }' var x1111 = foo([{a:null}]); // works - ambiguous call is resolved to be the first in the overload set so this returns a string @@ -46,6 +48,8 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload !!! 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'. +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:12:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }' +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:13:20: The expected type comes from property 'a' which is declared here on type '{ a: boolean; }' function foo4(bar:{a:number;}):number; @@ -57,4 +61,6 @@ tests/cases/compiler/overloadResolutionTest1.ts(24,9): error TS2763: No overload !!! 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 +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:21:20: The expected type comes from property 'a' which is declared here on type '{ a: number; }' +!!! related TS6500 tests/cases/compiler/overloadResolutionTest1.ts:22:20: The expected type comes from property 'a' which is declared here on type '{ a: string; }' \ No newline at end of file diff --git a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt index e6f568f0d29..8e9d1136547 100644 --- a/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt +++ b/tests/baselines/reference/overloadresolutionWithConstraintCheckingDeferred.errors.txt @@ -68,4 +68,6 @@ tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts(19,14): !!! 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'. +!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. +!!! related TS2728 tests/cases/compiler/overloadresolutionWithConstraintCheckingDeferred.ts:4:15: 'q' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt index 0c9a607b13c..a806a1ddf82 100644 --- a/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt +++ b/tests/baselines/reference/overloadsWithProvisionalErrors.errors.txt @@ -25,6 +25,7 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann !!! 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 +!!! related TS6502 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:14: The expected type comes from the return type of this signature. 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'. @@ -35,5 +36,7 @@ tests/cases/compiler/overloadsWithProvisionalErrors.ts(8,17): error TS2304: Cann !!! 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; }'. +!!! related TS2728 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:42: 'b' is declared here. +!!! related TS6502 tests/cases/compiler/overloadsWithProvisionalErrors.ts:3:14: The expected type comes from the return type of this signature. ~~~~ !!! 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 9207b909984..d08c33a3957 100644 --- a/tests/baselines/reference/promiseTypeInference.errors.txt +++ b/tests/baselines/reference/promiseTypeInference.errors.txt @@ -34,4 +34,7 @@ tests/cases/compiler/promiseTypeInference.ts(10,11): error TS2763: No overload m !!! 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'. +!!! related TS2728 /.ts/lib.es5.d.ts:1413:5: 'catch' is declared here. +!!! related TS6502 tests/cases/compiler/promiseTypeInference.ts:2:23: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1406:57: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt index c9f17da6254..9fc44f4dc8c 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload4.errors.txt @@ -105,6 +105,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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; }'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:3:43: 'yy1' is declared here. const c2 = ; // type incompatible; ~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -113,6 +114,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:3:43: The expected type comes from property 'yy1' which is declared here on type 'IntrinsicAttributes & { yy: number; yy1: string; }' const c3 = ; // This is OK becuase all attribute are spread const c4 = ; // extra property; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -146,6 +148,8 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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; }'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:21:38: The expected type comes from property 'extra-data' which is declared here on type 'IntrinsicAttributes & { "extra-data": string; }' +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:22:38: 'yy' is declared here. const d2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -154,6 +158,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:22:50: The expected type comes from property 'direction' which is declared here on type 'IntrinsicAttributes & { yy: string; direction?: number; }' declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element; declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element; @@ -169,6 +174,9 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:28:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; }' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:64: The expected type comes from property 'y3' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }' const e2 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -180,6 +188,7 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }' const e3 = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -190,6 +199,8 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }' const e4 = Hi ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -200,4 +211,6 @@ tests/cases/conformance/jsx/file.tsx(36,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:29:64: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:30:38: The expected type comes from property 'y1' which is declared here on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }' \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt index 214418e3375..df01c8fe94c 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt @@ -105,6 +105,9 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & ButtonProps' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & LinkProps' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:4:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & HyphenProps' const b7 = ; // incorrect type for optional attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -114,6 +117,9 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2763: No overload matches t !!! 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'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & ButtonProps' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & LinkProps' +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:5:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & HyphenProps' const b8 = ; // incorrect type for specified hyphanated name ~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -122,4 +128,7 @@ tests/cases/conformance/jsx/file.tsx(56,12): error TS2763: No overload matches t !!! 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 +!!! error TS2763: Type 'true' is not assignable to type 'string'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:9:5: 'onClick' is declared here. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:13:5: 'to' is declared here. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:17:5: The expected type comes from property 'data-format' which is declared here on type 'IntrinsicAttributes & HyphenProps' \ No newline at end of file diff --git a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt index fffd57b6272..5508a111e4d 100644 --- a/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt +++ b/tests/baselines/reference/tsxStatelessFunctionComponentsWithTypeArguments4.errors.txt @@ -36,6 +36,8 @@ tests/cases/conformance/jsx/file.tsx(10,14): error TS2763: No overload matches t !!! 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; }'. +!!! related TS6500 tests/cases/conformance/jsx/file.tsx:4:52: The expected type comes from property 'a' which is declared here on type 'IntrinsicAttributes & { b: unknown; a: string; "ignore-prop": boolean; }' +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:49: 'b' is declared here. let a2 = // missing a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2763: No overload matches this call. @@ -47,4 +49,6 @@ tests/cases/conformance/jsx/file.tsx(10,14): error TS2763: No overload matches t !!! 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; }'. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:4:52: 'a' is declared here. +!!! related TS2728 tests/cases/conformance/jsx/file.tsx:5:55: 'a' is declared here. } \ No newline at end of file