swc/crates/swc_ecma_parser/tests/tsc/tsxSpreadAttributesResolution1.tsx

20 lines
331 B
TypeScript
Raw Normal View History

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