25 lines
432 B
TypeScript
25 lines
432 B
TypeScript
//// [tsxAttributeResolution7.tsx]
|
|
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} />;
|
|
|
|
|
|
//// [tsxAttributeResolution7.jsx]
|
|
// Error
|
|
<test1 data-foo={32}/>;
|
|
// OK
|
|
<test1 data-foo={'32'}/>;
|
|
<test1 data-bar={'32'}/>;
|
|
<test1 data-bar={32}/>;
|