TypeScript/tests/cases/conformance/jsx/tsxAttributeResolution6.tsx

20 lines
309 B
TypeScript
Raw Normal View History

2015-06-18 23:03:43 +02:00
//@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 />;