53106cb5ed
Our logic for detecting SFC vs Element Class had a few issues: * Object Type flag is not actually useful * Parameter arity isn't actually relevant * The check for Element Class should take priority Fixes #6349 and #6353
23 lines
No EOL
460 B
TypeScript
23 lines
No EOL
460 B
TypeScript
// @filename: file.tsx
|
|
// @jsx: preserve
|
|
// @module: amd
|
|
// @noLib: true
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
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>
|
|
); |