swc/crates/swc_ecma_parser/tests/tsc/tsxAttributeResolution7.tsx
2022-02-04 17:08:38 +09:00

17 lines
274 B
TypeScript

//@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} />;