We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8936e9 commit 328f5ccCopy full SHA for 328f5cc
tests/cases/conformance/jsx/tsxUnionElementType1.tsx
@@ -0,0 +1,17 @@
1
+// @filename: file.tsx
2
+// @jsx: react
3
+// @noLib: true
4
+// @libFiles: react.d.ts,lib.d.ts
5
+
6
+import React = require('react');
7
8
+function SFC1(prop: { x: number }) {
9
+ return <div>hello</div>;
10
+};
11
12
+function SFC2(prop: { x: boolean }) {
13
+ return <h1>World </h1>;
14
+}
15
16
+var SFCComp = SFC1 || SFC2;
17
+<SFCComp x />
tests/cases/conformance/jsx/tsxUnionElementType2.tsx
+<SFCComp x={"hi"}/>
0 commit comments