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
* Heavy WIP, but has good contextual typing fix
* Add arity error, refine messages and spans
* Small error message change
* Better error messages, text-specific message
Copy file name to clipboardExpand all lines: tests/baselines/reference/checkJsxChildrenProperty14.errors.txt
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,4 @@
1
-
tests/cases/conformance/jsx/file.tsx(42,11): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'SingleChildProp'.
2
-
Types of property 'children' are incompatible.
3
-
Type 'Element[]' is missing the following properties from type 'Element': type, props
1
+
tests/cases/conformance/jsx/file.tsx(42,11): error TS2746: This JSX tag's 'children' prop expects a single child of type 'Element', but multiple children were provided.
Copy file name to clipboardExpand all lines: tests/baselines/reference/checkJsxChildrenProperty2.errors.txt
+8-32Lines changed: 8 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,9 @@
1
1
tests/cases/conformance/jsx/file.tsx(14,10): error TS2741: Property 'children' is missing in type '{ a: number; b: string; }' but required in type 'Prop'.
2
2
tests/cases/conformance/jsx/file.tsx(17,11): error TS2710: 'children' are specified twice. The attribute named 'children' will be overwritten.
3
-
tests/cases/conformance/jsx/file.tsx(31,6): error TS2322: Type '{ children: (Element | ((name: string) => Element))[]; a: number; b: string; }' is not assignable to type 'Prop'.
4
-
Types of property 'children' are incompatible.
5
-
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string | Element'.
6
-
Type '(Element | ((name: string) => Element))[]' is not assignable to type 'string'.
7
-
tests/cases/conformance/jsx/file.tsx(37,6): error TS2322: Type '{ children: (number | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
8
-
Types of property 'children' are incompatible.
9
-
Type '(number | Element)[]' is not assignable to type 'string | Element'.
10
-
Type '(number | Element)[]' is not assignable to type 'string'.
11
-
tests/cases/conformance/jsx/file.tsx(43,6): error TS2322: Type '{ children: (string | Element)[]; a: number; b: string; }' is not assignable to type 'Prop'.
12
-
Types of property 'children' are incompatible.
13
-
Type '(string | Element)[]' is not assignable to type 'string | Element'.
14
-
Type '(string | Element)[]' is not assignable to type 'string'.
15
-
tests/cases/conformance/jsx/file.tsx(49,6): error TS2322: Type '{ children: Element[]; a: number; b: string; }' is not assignable to type 'Prop'.
16
-
Types of property 'children' are incompatible.
17
-
Type 'Element[]' is not assignable to type 'string | Element'.
18
-
Type 'Element[]' is not assignable to type 'string'.
3
+
tests/cases/conformance/jsx/file.tsx(31,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
4
+
tests/cases/conformance/jsx/file.tsx(37,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
5
+
tests/cases/conformance/jsx/file.tsx(43,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
6
+
tests/cases/conformance/jsx/file.tsx(49,6): error TS2746: This JSX tag's 'children' prop expects a single child of type 'string | Element', but multiple children were provided.
0 commit comments