Skip to content

Commit 4010afc

Browse files
committed
test: jsxFragmentFactory not valid identifier
1 parent 7821c69 commit 4010afc

5 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name.
2+
3+
4+
!!! error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name.
5+
==== tests/cases/compiler/jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.tsx (0 errors) ====
6+
declare var h: any;
7+
8+
<></>;
9+
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//// [jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.tsx]
2+
declare var h: any;
3+
4+
<></>;
5+
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
6+
7+
//// [jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.js]
8+
h(React.Fragment, null);
9+
h(React.Fragment, null,
10+
h("span", null, "1"),
11+
h(React.Fragment, null,
12+
h("span", null, "2.1"),
13+
h("span", null, "2.2")));
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.tsx ===
2+
declare var h: any;
3+
>h : Symbol(h, Decl(jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.tsx, 0, 11))
4+
5+
<></>;
6+
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
=== tests/cases/compiler/jsxFactoryWithJsxFragmentFactoryErrorNotIdentifier.tsx ===
2+
declare var h: any;
3+
>h : any
4+
5+
<></>;
6+
><></> : any
7+
8+
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
9+
><><span>1</span><><span>2.1</span><span>2.2</span></></> : any
10+
><span>1</span> : any
11+
>span : any
12+
>span : any
13+
><><span>2.1</span><span>2.2</span></> : any
14+
><span>2.1</span> : any
15+
>span : any
16+
>span : any
17+
><span>2.2</span> : any
18+
>span : any
19+
>span : any
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@jsx: react
2+
//@jsxFactory: h
3+
//@jsxFragmentFactory: 234
4+
5+
declare var h: any;
6+
7+
<></>;
8+
<><span>1</span><><span>2.1</span><span>2.2</span></></>;

0 commit comments

Comments
 (0)