File: tsxStatelessFunctionComponentsWithTypeArguments5.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 (82 lines) | stat: -rw-r--r-- 3,509 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react')
>React : Symbol(React, Decl(file.tsx, 0, 0))

declare function Component<U>(l: U): JSX.Element;
>Component : Symbol(Component, Decl(file.tsx, 0, 31))
>U : Symbol(U, Decl(file.tsx, 2, 27))
>l : Symbol(l, Decl(file.tsx, 2, 30))
>U : Symbol(U, Decl(file.tsx, 2, 27))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))

function createComponent<T extends { prop: number }>(arg: T) {
>createComponent : Symbol(createComponent, Decl(file.tsx, 2, 49))
>T : Symbol(T, Decl(file.tsx, 3, 25))
>prop : Symbol(prop, Decl(file.tsx, 3, 36))
>arg : Symbol(arg, Decl(file.tsx, 3, 53))
>T : Symbol(T, Decl(file.tsx, 3, 25))

    let a1 = <Component {...arg} />;
>a1 : Symbol(a1, Decl(file.tsx, 4, 7))
>Component : Symbol(Component, Decl(file.tsx, 0, 31))
>arg : Symbol(arg, Decl(file.tsx, 3, 53))

    let a2 = <Component {...arg} prop1 />;
>a2 : Symbol(a2, Decl(file.tsx, 5, 7))
>Component : Symbol(Component, Decl(file.tsx, 0, 31))
>arg : Symbol(arg, Decl(file.tsx, 3, 53))
>prop1 : Symbol(prop1, Decl(file.tsx, 5, 32))
}

declare function ComponentSpecific<U>(l: { prop: U }): JSX.Element;
>ComponentSpecific : Symbol(ComponentSpecific, Decl(file.tsx, 6, 1))
>U : Symbol(U, Decl(file.tsx, 8, 35))
>l : Symbol(l, Decl(file.tsx, 8, 38))
>prop : Symbol(prop, Decl(file.tsx, 8, 42))
>U : Symbol(U, Decl(file.tsx, 8, 35))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))

declare function ComponentSpecific1<U>(l: { prop: U, "ignore-prop": number }): JSX.Element;
>ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 8, 67))
>U : Symbol(U, Decl(file.tsx, 9, 36))
>l : Symbol(l, Decl(file.tsx, 9, 39))
>prop : Symbol(prop, Decl(file.tsx, 9, 43))
>U : Symbol(U, Decl(file.tsx, 9, 36))
>"ignore-prop" : Symbol("ignore-prop", Decl(file.tsx, 9, 52))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))

function Bar<T extends { prop: number }>(arg: T) {
>Bar : Symbol(Bar, Decl(file.tsx, 9, 91))
>T : Symbol(T, Decl(file.tsx, 11, 13))
>prop : Symbol(prop, Decl(file.tsx, 11, 24))
>arg : Symbol(arg, Decl(file.tsx, 11, 41))
>T : Symbol(T, Decl(file.tsx, 11, 13))

    let a1 = <ComponentSpecific {...arg} ignore-prop="hi" />;  // U is number
>a1 : Symbol(a1, Decl(file.tsx, 12, 7))
>ComponentSpecific : Symbol(ComponentSpecific, Decl(file.tsx, 6, 1))
>arg : Symbol(arg, Decl(file.tsx, 11, 41))
>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 12, 40))

    let a2 = <ComponentSpecific1 {...arg} ignore-prop={10} />;  // U is number
>a2 : Symbol(a2, Decl(file.tsx, 13, 7))
>ComponentSpecific1 : Symbol(ComponentSpecific1, Decl(file.tsx, 8, 67))
>arg : Symbol(arg, Decl(file.tsx, 11, 41))
>ignore-prop : Symbol(ignore-prop, Decl(file.tsx, 13, 41))

    let a3 = <ComponentSpecific {...arg} prop="hello" />;   // U is "hello"
>a3 : Symbol(a3, Decl(file.tsx, 14, 7))
>ComponentSpecific : Symbol(ComponentSpecific, Decl(file.tsx, 6, 1))
>arg : Symbol(arg, Decl(file.tsx, 11, 41))
>prop : Symbol(prop, Decl(file.tsx, 14, 40))

    let a4 = <ComponentSpecific {...arg} prop1="hello" />;   // U is "hello"
>a4 : Symbol(a4, Decl(file.tsx, 15, 7))
>ComponentSpecific : Symbol(ComponentSpecific, Decl(file.tsx, 6, 1))
>arg : Symbol(arg, Decl(file.tsx, 11, 41))
>prop1 : Symbol(prop1, Decl(file.tsx, 15, 40))
}