61 lines
1.5 KiB
Plaintext
61 lines
1.5 KiB
Plaintext
=== tests/cases/conformance/jsx/file.tsx ===
|
|
declare module JSX {
|
|
interface Element { }
|
|
interface IntrinsicElements {
|
|
[s: string]: any;
|
|
>s : string
|
|
}
|
|
}
|
|
declare var React: any;
|
|
>React : any
|
|
|
|
<div>Dot goes here: · ¬AnEntity; </div>;
|
|
><div>Dot goes here: · ¬AnEntity; </div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
<div>Be careful of "-ed strings!</div>;
|
|
><div>Be careful of "-ed strings!</div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
<div>{{braces}}</div>;
|
|
><div>{{braces}}</div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
// Escapes do nothing
|
|
<div>\n</div>;
|
|
><div>\n</div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
// Also works in string literal attributes
|
|
<div attr="{…}\"></div>;
|
|
><div attr="{…}\"></div> : JSX.Element
|
|
>div : any
|
|
>attr : string
|
|
>div : any
|
|
|
|
// Does not happen for a string literal that happens to be inside an attribute (and escapes then work)
|
|
<div attr={"{…}\""}></div>;
|
|
><div attr={"{…}\""}></div> : JSX.Element
|
|
>div : any
|
|
>attr : string
|
|
>"{…}\"" : "{…}\""
|
|
>div : any
|
|
|
|
// Preserves single quotes
|
|
<div attr='"'></div>;
|
|
><div attr='"'></div> : JSX.Element
|
|
>div : any
|
|
>attr : string
|
|
>div : any
|
|
|
|
// https://github.com/microsoft/TypeScript/issues/35732
|
|
<div>🐈🐕🐇🐑</div>;
|
|
><div>🐈🐕🐇🐑</div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|