TypeScript/tests/cases/conformance/jsx/tsxCorrectlyParseLessThanComparison1.tsx

20 lines
430 B
TypeScript
Raw Normal View History

2016-09-24 02:28:08 +02:00
// @jsx: react
declare module JSX {
interface Element {
div: string;
}
}
declare namespace React {
class Component<P, S> {
constructor(props?: P, context?: any);
props: P;
}
}
export class ShortDetails extends React.Component<{ id: number }, {}> {
public render(): JSX.Element {
if (this.props.id < 1) {
return (<div></div>);
}
}
}