File: tsxReactEmitEntities.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (52 lines) | stat: -rw-r--r-- 1,908 bytes parent folder | download
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: &middot; &notAnEntity; </div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))

<div>Be careful of &quot;-ed strings!</div>;
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 1, 22))

<div>&#0123;&#123;braces&#x7d;&#x7D;</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="&#0123;&hellip;&#x7D;\"></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={"&#0123;&hellip;&#x7D;\""}></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))