mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
487 B
TypeScript
33 lines
487 B
TypeScript
//// [tests/cases/conformance/jsx/tsxAttributeResolution6.tsx] ////
|
|
|
|
//// [file.tsx]
|
|
declare namespace 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]
|
|
"use strict";
|
|
// Error
|
|
<test1 s/>;
|
|
<test1 n='true'/>;
|
|
<test2 />;
|
|
// OK
|
|
<test1 n/>;
|
|
<test1 n={false}/>;
|
|
<test2 n/>;
|