File: tsxUnionElementType5.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 (54 lines) | stat: -rw-r--r-- 1,915 bytes parent folder | download | duplicates (5)
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
53
54
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))

function EmptySFC1() {
>EmptySFC1 : Symbol(EmptySFC1, Decl(file.tsx, 0, 32))

    return <div>hello</div>;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}

function EmptySFC2() {
>EmptySFC2 : Symbol(EmptySFC2, Decl(file.tsx, 4, 1))

    return <div>Hello</div>;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}

function SFC2(prop: { x: boolean }) {
>SFC2 : Symbol(SFC2, Decl(file.tsx, 8, 1))
>prop : Symbol(prop, Decl(file.tsx, 10, 14))
>x : Symbol(x, Decl(file.tsx, 10, 21))

    return <h1>World</h1>;
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
}

var EmptySFCComp = EmptySFC1 || EmptySFC2;
>EmptySFCComp : Symbol(EmptySFCComp, Decl(file.tsx, 14, 3))
>EmptySFC1 : Symbol(EmptySFC1, Decl(file.tsx, 0, 32))
>EmptySFC2 : Symbol(EmptySFC2, Decl(file.tsx, 4, 1))

var SFC2AndEmptyComp = SFC2 || EmptySFC1;
>SFC2AndEmptyComp : Symbol(SFC2AndEmptyComp, Decl(file.tsx, 15, 3))
>SFC2 : Symbol(SFC2, Decl(file.tsx, 8, 1))
>EmptySFC1 : Symbol(EmptySFC1, Decl(file.tsx, 0, 32))

let a = <EmptySFCComp />
>a : Symbol(a, Decl(file.tsx, 17, 3))
>EmptySFCComp : Symbol(EmptySFCComp, Decl(file.tsx, 14, 3))

let a1 = <EmptySFCComp data-prop />
>a1 : Symbol(a1, Decl(file.tsx, 18, 3))
>EmptySFCComp : Symbol(EmptySFCComp, Decl(file.tsx, 14, 3))
>data-prop : Symbol(data-prop, Decl(file.tsx, 18, 22))

let b = <SFC2AndEmptyComp x />
>b : Symbol(b, Decl(file.tsx, 19, 3))
>SFC2AndEmptyComp : Symbol(SFC2AndEmptyComp, Decl(file.tsx, 15, 3))
>x : Symbol(x, Decl(file.tsx, 19, 25))