1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
//// [file.tsx]
import React = require('react');
const Foo = (props: any) => <div/>;
// Should be OK
const foo = <Foo />;
// Should be OK
var MainMenu: React.StatelessComponent<{}> = (props) => (<div>
<h3>Main Menu</h3>
</div>);
var App: React.StatelessComponent<{ children }> = ({children}) => (
<div >
<MainMenu/>
</div>
);
//// [file.jsx]
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
exports.__esModule = true;
var Foo = function (props) { return <div />; };
// Should be OK
var foo = <Foo />;
// Should be OK
var MainMenu = function (props) { return (<div>
<h3>Main Menu</h3>
</div>); };
var App = function (_a) {
var children = _a.children;
return (<div>
<MainMenu />
</div>);
};
});
|