Skip to content

Commit 328f5cc

Browse files
author
Kanchalai Tanglertsampan
committed
Add conformance tests for union element type
1 parent d8936e9 commit 328f5cc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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 />
Original file line numberDiff line numberDiff line change
@@ -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={"hi"}/>

0 commit comments

Comments
 (0)