mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
26 lines
503 B
TypeScript
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} />;
|