mirror of
https://github.com/swc-project/swc.git
synced 2024-12-03 00:54:25 +03:00
20 lines
290 B
TypeScript
20 lines
290 B
TypeScript
//@filename: file.tsx
|
|
//@jsx: preserve
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
test1: { n?: boolean; s?: string};
|
|
test2: { n: boolean; };
|
|
}
|
|
}
|
|
|
|
// Error
|
|
<test1 s />;
|
|
<test1 n='true' />;
|
|
<test2 />;
|
|
|
|
// OK
|
|
<test1 n />;
|
|
<test1 n={false} />;
|
|
<test2 n />;
|