mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 11:11:30 +03:00
32 lines
448 B
TypeScript
32 lines
448 B
TypeScript
//@jsx: preserve
|
|
//@module: amd
|
|
|
|
//@filename: react.d.ts
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
}
|
|
interface ElementAttributesProperty {
|
|
props;
|
|
}
|
|
}
|
|
|
|
//@filename: file.tsx
|
|
export class MyComponent {
|
|
render() {
|
|
}
|
|
|
|
props: {
|
|
[s: string]: boolean;
|
|
}
|
|
}
|
|
|
|
// Should be an error
|
|
<MyComponent bar='world' />;
|
|
|
|
// Should be OK
|
|
<MyComponent bar={true} />;
|
|
|
|
// Should be ok
|
|
<MyComponent data-bar='hello' />;
|