18 lines
315 B
TypeScript
18 lines
315 B
TypeScript
|
// @filename: file.tsx
|
||
|
// @jsx: preserve
|
||
|
// @noLib: true
|
||
|
// @libFiles: react.d.ts,lib.d.ts
|
||
|
|
||
|
import React = require('react');
|
||
|
|
||
|
class Poisoned extends React.Component<{}, {}> {
|
||
|
render() {
|
||
|
return <div>Hello</div>;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const obj: Object = {};
|
||
|
|
||
|
// OK
|
||
|
let p = <Poisoned {...obj} />;
|
||
|
let y = <Poisoned />;
|