32 lines
479 B
TypeScript
32 lines
479 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' />;
|