1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 1, 22))
[s: string]: any;
>s : Symbol(s, Decl(file.tsx, 3, 3))
}
}
declare var React: any;
>React : Symbol(React, Decl(file.tsx, 6, 11))
<div>Dot goes here: · ¬AnEntity; </div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
<div>Be careful of "-ed strings!</div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
<div>{{braces}}</div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
// Escapes do nothing
<div>\n</div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
// Also works in string literal attributes
<div attr="{…}\"></div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>attr : Symbol(attr, Decl(file.tsx, 15, 4))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
// Does not happen for a string literal that happens to be inside an attribute (and escapes then work)
<div attr={"{…}\""}></div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>attr : Symbol(attr, Decl(file.tsx, 17, 4))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
// Preserves single quotes
<div attr='"'></div>
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>attr : Symbol(attr, Decl(file.tsx, 19, 4))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
|