Files
tsgo/testdata/baselines/reference/submoduleAccepted/conformance/tsxElementResolution9.errors.txt.diff

65 lines
3.8 KiB
Diff

--- old.tsxElementResolution9.errors.txt
+++ new.tsxElementResolution9.errors.txt
@@= skipped -0, +0 lines =@@
file.tsx(2,22): error TS7008: Member 'something' implicitly has an 'any' type.
file.tsx(11,2): error TS2769: 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.
+ The last overload gave the following error.
Type '{}' is not assignable to type 'number'.
file.tsx(18,2): error TS2769: 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.
+ The last overload gave the following error.
Type '{}' is not assignable to type 'number'.
file.tsx(18,2): error TS2786: 'Obj2' cannot be used as a JSX component.
Its return type '{ x: number; } & { y: string; }' is not a valid JSX element.
file.tsx(25,2): error TS2769: 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.
+ The last overload gave the following error.
Type '{ x: number; }' is not assignable to type 'number'.
file.tsx(25,2): error TS2786: 'Obj3' cannot be used as a JSX component.
Its return type '{ x: number; } & { x: number; y: string; }' is not a valid JSX element.
@@= skipped -35, +29 lines =@@
<Obj1 />; // Error, return type is not an object type
~~~~
!!! error TS2769: No overload matches this call.
-!!! error TS2769: Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
-!!! error TS2769: Type '{}' is not assignable to type 'string'.
-!!! error TS2769: Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
+!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Type '{}' is not assignable to type 'number'.
+!!! related TS2771 file.tsx:8:2: The last overload is declared here.
interface Obj2 {
(n: string): { x: number };
@@= skipped -13, +12 lines =@@
<Obj2 />; // Error, return type is not an object type
~~~~
!!! error TS2769: No overload matches this call.
-!!! error TS2769: Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
-!!! error TS2769: Type '{}' is not assignable to type 'string'.
-!!! error TS2769: Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
+!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Type '{}' is not assignable to type 'number'.
+!!! related TS2771 file.tsx:15:2: The last overload is declared here.
~~~~
!!! error TS2786: 'Obj2' cannot be used as a JSX component.
!!! error TS2786: Its return type '{ x: number; } & { y: string; }' is not a valid JSX element.
@@= skipped -16, +15 lines =@@
<Obj3 x={42} />; // OK
~~~~
!!! error TS2769: No overload matches this call.
-!!! error TS2769: Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
-!!! error TS2769: Type '{ x: number; }' is not assignable to type 'string'.
-!!! error TS2769: Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error.
+!!! error TS2769: The last overload gave the following error.
!!! error TS2769: Type '{ x: number; }' is not assignable to type 'number'.
+!!! related TS2771 file.tsx:22:2: The last overload is declared here.
~~~~
!!! error TS2786: 'Obj3' cannot be used as a JSX component.
!!! error TS2786: Its return type '{ x: number; } & { x: number; y: string; }' is not a valid JSX element.