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

17 lines
290 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: { "data-foo"?: string };
}
}
// Error
<test1 data-foo={32} />;
// OK
<test1 data-foo={'32'} />;
<test1 data-bar={'32'} />;
<test1 data-bar={32} />;