2016-11-08 18:32:26 +01:00
|
|
|
// @filename: file.tsx
|
|
|
|
// @jsx: preserve
|
|
|
|
// @noLib: true
|
2017-10-04 22:14:05 +02:00
|
|
|
// @skipLibCheck: true
|
2016-11-08 18:32:26 +01:00
|
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
|
|
|
|
import React = require('react');
|
|
|
|
|
|
|
|
interface PoisonedProp {
|
|
|
|
x: string;
|
|
|
|
y: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Poisoned extends React.Component<PoisonedProp, {}> {
|
|
|
|
render() {
|
|
|
|
return <div>Hello</div>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const obj = {
|
|
|
|
x: "hello world",
|
|
|
|
y: 2
|
|
|
|
};
|
|
|
|
|
|
|
|
// OK
|
|
|
|
let p = <Poisoned {...obj} />;
|
|
|
|
let y = <Poisoned x="hi" y={2} />;
|