TypeScript/tests/baselines/reference/tsxAttributeResolution6.js
2015-09-14 12:40:47 -07:00

29 lines
398 B
TypeScript

//// [file.tsx]
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 />;
//// [file.jsx]
// Error
<test1 s/>;
<test1 n='true'/>;
<test2 />;
// OK
<test1 n/>;
<test1 n={false}/>;
<test2 n/>;