mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
30 lines
395 B
TypeScript
30 lines
395 B
TypeScript
//@jsx: preserve
|
|
//@module: amd
|
|
|
|
//@filename: react.d.ts
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
}
|
|
interface ElementAttributesProperty {
|
|
props;
|
|
}
|
|
interface IntrinsicAttributes {
|
|
ref?: string;
|
|
}
|
|
}
|
|
|
|
//@filename: file.tsx
|
|
class MyComponent {
|
|
render() {
|
|
}
|
|
|
|
props: {
|
|
ref?: string;
|
|
}
|
|
}
|
|
|
|
// Should be an OK
|
|
var x = <MyComponent bar='world' />;
|
|
|