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
|
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : typeof React
class Poisoned extends React.Component<{}, {}> {
>Poisoned : Poisoned
>React.Component : React.Component<{}, {}>
>React : typeof React
>Component : typeof React.Component
render() {
>render : () => JSX.Element
return <div>Hello</div>;
><div>Hello</div> : JSX.Element
>div : any
>div : any
}
}
const obj = {};
>obj : {}
>{} : {}
// OK
let p = <Poisoned {...obj} />;
>p : JSX.Element
><Poisoned {...obj} /> : JSX.Element
>Poisoned : typeof Poisoned
>obj : {}
let y = <Poisoned />;
>y : JSX.Element
><Poisoned /> : JSX.Element
>Poisoned : typeof Poisoned
|