You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/cases/conformance/jsx/file.tsx(12,13): error TS2322: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
2
-
Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
3
-
tests/cases/conformance/jsx/file.tsx(13,13): error TS2741: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
4
-
tests/cases/conformance/jsx/file.tsx(14,31): error TS2322: Type 'true' is not assignable to type 'string'.
5
-
tests/cases/conformance/jsx/file.tsx(16,13): error TS2322: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
6
-
Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
7
-
tests/cases/conformance/jsx/file.tsx(17,13): error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
8
-
Types of property 'yy' are incompatible.
9
-
Type 'boolean' is not assignable to type 'number'.
10
-
tests/cases/conformance/jsx/file.tsx(25,13): error TS2741: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'.
11
-
tests/cases/conformance/jsx/file.tsx(26,40): error TS2322: Type 'string' is not assignable to type 'number'.
12
-
tests/cases/conformance/jsx/file.tsx(33,32): error TS2322: Type 'string' is not assignable to type 'boolean'.
13
-
tests/cases/conformance/jsx/file.tsx(34,29): error TS2322: Type 'string' is not assignable to type 'boolean'.
14
-
tests/cases/conformance/jsx/file.tsx(35,29): error TS2322: Type 'string' is not assignable to type 'boolean'.
15
-
tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not assignable to type 'boolean'.
1
+
tests/cases/conformance/jsx/file.tsx(12,12): error TS2755: No suitable overload for this call.
2
+
tests/cases/conformance/jsx/file.tsx(13,12): error TS2755: No suitable overload for this call.
3
+
tests/cases/conformance/jsx/file.tsx(14,12): error TS2755: No suitable overload for this call.
4
+
tests/cases/conformance/jsx/file.tsx(16,12): error TS2755: No suitable overload for this call.
5
+
tests/cases/conformance/jsx/file.tsx(17,12): error TS2755: No suitable overload for this call.
6
+
tests/cases/conformance/jsx/file.tsx(25,12): error TS2755: No suitable overload for this call.
7
+
tests/cases/conformance/jsx/file.tsx(26,12): error TS2755: No suitable overload for this call.
8
+
tests/cases/conformance/jsx/file.tsx(33,12): error TS2755: No suitable overload for this call.
9
+
tests/cases/conformance/jsx/file.tsx(34,12): error TS2755: No suitable overload for this call.
10
+
tests/cases/conformance/jsx/file.tsx(35,12): error TS2755: No suitable overload for this call.
11
+
tests/cases/conformance/jsx/file.tsx(36,12): error TS2755: No suitable overload for this call.
@@ -28,27 +24,49 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not
28
24
29
25
// Error
30
26
const c0 = <OneThing extraProp />; // extra property;
31
-
~~~~~~~~
32
-
!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
33
-
!!! error TS2322: Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
27
+
~~~~~~~~~~~~~~~~~~~~~~
28
+
!!! error TS2755: No suitable overload for this call.
29
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:12:13: Overload 1 of 2, '(): Element', gave the following error.
30
+
Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes'.
31
+
Property 'extraProp' does not exist on type 'IntrinsicAttributes'.
32
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:12:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
33
+
Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
34
+
Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
!!! error TS2741: Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
37
-
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:3:43: 'yy1' is declared here.
36
+
~~~~~~~~~~~~~~~~~~~
37
+
!!! error TS2755: No suitable overload for this call.
38
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:13:13: Overload 1 of 2, '(): Element', gave the following error.
39
+
Type '{ yy: number; }' is not assignable to type 'IntrinsicAttributes'.
40
+
Property 'yy' does not exist on type 'IntrinsicAttributes'.
41
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:13:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
42
+
Property 'yy1' is missing in type '{ yy: number; }' but required in type '{ yy: number; yy1: string; }'.
38
43
const c2 = <OneThing {...obj} yy1 />; // type incompatible;
39
-
~~~
40
-
!!! error TS2322: Type 'true' is not assignable to type 'string'.
41
-
!!! 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; }'
44
+
~~~~~~~~~~~~~~~~~~~~~~~~~
45
+
!!! error TS2755: No suitable overload for this call.
46
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:14:13: Overload 1 of 2, '(): Element', gave the following error.
47
+
Type '{ yy1: true; yy: number; }' is not assignable to type 'IntrinsicAttributes'.
48
+
Property 'yy1' does not exist on type 'IntrinsicAttributes'.
49
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:14:31: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
50
+
Type 'true' is not assignable to type 'string'.
42
51
const c3 = <OneThing {...obj} {...{extra: "extra attr"}} />; // This is OK becuase all attribute are spread
43
52
const c4 = <OneThing {...obj} y1={10000} />; // extra property;
44
-
~~~~~~~~
45
-
!!! error TS2322: Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
46
-
!!! error TS2322: Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
53
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54
+
!!! error TS2755: No suitable overload for this call.
55
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:16:13: Overload 1 of 2, '(): Element', gave the following error.
56
+
Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes'.
57
+
Property 'y1' does not exist on type 'IntrinsicAttributes'.
58
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:16:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
59
+
Type '{ y1: number; yy: number; yy1: string; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
60
+
Property 'y1' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
!!! error TS2322: Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
50
-
!!! error TS2322: Types of property 'yy' are incompatible.
51
-
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
62
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
+
!!! error TS2755: No suitable overload for this call.
64
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:17:13: Overload 1 of 2, '(): Element', gave the following error.
65
+
Type '{ yy: boolean; yy1: string; }' has no properties in common with type 'IntrinsicAttributes'.
66
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:17:13: Overload 2 of 2, '(l: { yy: number; yy1: string; }): Element', gave the following error.
67
+
Type '{ yy: boolean; yy1: string; }' is not assignable to type '{ yy: number; yy1: string; }'.
68
+
Types of property 'yy' are incompatible.
69
+
Type 'boolean' is not assignable to type 'number'.
52
70
const c6 = <OneThing {...obj2} {...{extra: "extra attr"}} />; // Should error as there is extra attribute that doesn't match any. Current it is not
53
71
const c7 = <OneThing {...obj2} yy />; // Should error as there is extra attribute that doesn't match any. Current it is not
54
72
@@ -57,33 +75,64 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type 'string' is not
57
75
58
76
// Error
59
77
const d1 = <TestingOneThing extra-data />
60
-
~~~~~~~~~~~~~~~
61
-
!!! error TS2741: Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'.
62
-
!!! related TS2728 tests/cases/conformance/jsx/file.tsx:22:38: 'yy' is declared here.
78
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79
+
!!! error TS2755: No suitable overload for this call.
80
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:29: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error.
81
+
Type 'true' is not assignable to type 'string'.
82
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:25:13: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
83
+
Property 'yy' is missing in type '{ extra-data: true; }' but required in type '{ yy: string; direction?: number; }'.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
66
-
!!! 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; }'
85
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
86
+
!!! error TS2755: No suitable overload for this call.
87
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:26:13: Overload 1 of 2, '(j: { "extra-data": string; }): Element', gave the following error.
88
+
Type '{ yy: string; direction: string; }' is not assignable to type 'IntrinsicAttributes & { "extra-data": string; }'.
89
+
Property 'yy' does not exist on type 'IntrinsicAttributes & { "extra-data": string; }'.
90
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:26:40: Overload 2 of 2, '(n: { yy: string; direction?: number; }): Element', gave the following error.
91
+
Type 'string' is not assignable to type 'number'.
67
92
68
93
declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
69
94
declare function TestingOptional(a: {y1?: string, y2?: number, children: JSX.Element}): JSX.Element;
70
95
declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JSX.Element;
71
96
72
97
// Error
73
98
const e1 = <TestingOptional y1 y3="hello"/>
74
-
~~
75
-
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
76
-
!!! 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; }'
99
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
+
!!! error TS2755: No suitable overload for this call.
101
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:29: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
102
+
Type 'true' is not assignable to type 'string'.
103
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:29: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error.
104
+
Type 'true' is not assignable to type 'string'.
105
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:33:32: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
106
+
Type 'string' is not assignable to type 'boolean'.
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
80
-
!!! 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; }'
108
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109
+
!!! error TS2755: No suitable overload for this call.
110
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
111
+
Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
112
+
Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
113
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:13: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error.
114
+
Type '{ y1: string; y2: number; y3: true; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'.
115
+
Property 'y3' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; children: Element; }'.
116
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:34:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
117
+
Type 'string' is not assignable to type 'boolean'.
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
84
-
!!! 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; }'
!!! error TS2755: No suitable overload for this call.
121
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
122
+
Type '{ y1: string; y2: number; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
123
+
Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
124
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error.
125
+
Type 'string' is not assignable to type 'Element'.
126
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:35:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
127
+
Type 'string' is not assignable to type 'boolean'.
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
88
-
!!! 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; }'
129
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
+
!!! error TS2755: No suitable overload for this call.
131
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:13: Overload 1 of 3, '(a: { y1?: string; y2?: number; }): Element', gave the following error.
132
+
Type '{ children: string; y1: string; y2: number; }' is not assignable to type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
133
+
Property 'children' does not exist on type 'IntrinsicAttributes & { y1?: string; y2?: number; }'.
134
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:50: Overload 2 of 3, '(a: { y1?: string; y2?: number; children: Element; }): Element', gave the following error.
135
+
'TestingOptional' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of 'children' is 'Element'.
136
+
!!! related TS2757 tests/cases/conformance/jsx/file.tsx:36:29: Overload 3 of 3, '(a: { y1: boolean; y2?: number; y3: boolean; }): Element', gave the following error.
137
+
Type 'string' is not assignable to type 'boolean'.
0 commit comments