File: tsxUnionElementType2.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (34 lines) | stat: -rw-r--r-- 1,098 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
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))

function SFC1(prop: { x: number }) {
>SFC1 : Symbol(SFC1, Decl(file.tsx, 0, 32))
>prop : Symbol(prop, Decl(file.tsx, 2, 14))
>x : Symbol(x, Decl(file.tsx, 2, 21))

    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, 4, 2))
>prop : Symbol(prop, Decl(file.tsx, 6, 14))
>x : Symbol(x, Decl(file.tsx, 6, 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 SFCComp = SFC1 || SFC2;
>SFCComp : Symbol(SFCComp, Decl(file.tsx, 10, 3))
>SFC1 : Symbol(SFC1, Decl(file.tsx, 0, 32))
>SFC2 : Symbol(SFC2, Decl(file.tsx, 4, 2))

<SFCComp x={"hi"}/>
>SFCComp : Symbol(SFCComp, Decl(file.tsx, 10, 3))
>x : Symbol(x, Decl(file.tsx, 11, 8))