mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
483 B
TypeScript
28 lines
483 B
TypeScript
//// [tests/cases/conformance/jsx/tsxAttributeResolution7.tsx] ////
|
|
|
|
//// [file.tsx]
|
|
declare namespace 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} />;
|
|
|
|
|
|
//// [file.jsx]
|
|
"use strict";
|
|
// Error
|
|
<test1 data-foo={32}/>;
|
|
// OK
|
|
<test1 data-foo={'32'}/>;
|
|
<test1 data-bar={'32'}/>;
|
|
<test1 data-bar={32}/>;
|