swc/crates/swc_ecma_parser/tests/tsc/tsxSpreadAttributesResolution17.tsx
2022-02-04 17:08:38 +09:00

26 lines
503 B
TypeScript

// @strictNullChecks: true
// @filename: file.tsx
// @jsx: preserve
// @noLib: true
// @skipLibCheck: true
// @libFiles: lib.d.ts
declare global {
namespace JSX {
interface Element {}
interface ElementAttributesProperty { props: {} }
}
}
declare var React: any;
export class Empty extends React.Component<{}, {}> {
render() {
return <div>Hello</div>;
}
}
declare const obj: { a: number | undefined } | undefined;
// OK
let unionedSpread = <Empty {...obj} />;