File: tsxAttributeResolution12.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (117 lines) | stat: -rw-r--r-- 3,999 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
=== tests/cases/conformance/jsx/react.d.ts ===
declare module JSX {
>JSX : Symbol(JSX, Decl(react.d.ts, 0, 0))

	interface Element { }
>Element : Symbol(Element, Decl(react.d.ts, 0, 20))

	interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(react.d.ts, 1, 22))
	}
	interface ElementAttributesProperty {
>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(react.d.ts, 3, 2))

		props;
>props : Symbol(ElementAttributesProperty.props, Decl(react.d.ts, 4, 38))
	}
	interface IntrinsicAttributes {
>IntrinsicAttributes : Symbol(IntrinsicAttributes, Decl(react.d.ts, 6, 2))

		ref?: string;
>ref : Symbol(IntrinsicAttributes.ref, Decl(react.d.ts, 7, 32))
	}
}

=== tests/cases/conformance/jsx/file.tsx ===
declare class Component<P, S>  {
>Component : Symbol(Component, Decl(file.tsx, 0, 0))
>P : Symbol(P, Decl(file.tsx, 0, 24))
>S : Symbol(S, Decl(file.tsx, 0, 26))

	constructor(props?: P, context?: any);
>props : Symbol(props, Decl(file.tsx, 1, 13))
>P : Symbol(P, Decl(file.tsx, 0, 24))
>context : Symbol(context, Decl(file.tsx, 1, 23))

	setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
>setState : Symbol(Component.setState, Decl(file.tsx, 1, 39), Decl(file.tsx, 2, 72))
>f : Symbol(f, Decl(file.tsx, 2, 10))
>prevState : Symbol(prevState, Decl(file.tsx, 2, 14))
>S : Symbol(S, Decl(file.tsx, 0, 26))
>props : Symbol(props, Decl(file.tsx, 2, 27))
>P : Symbol(P, Decl(file.tsx, 0, 24))
>S : Symbol(S, Decl(file.tsx, 0, 26))
>callback : Symbol(callback, Decl(file.tsx, 2, 43))

	setState(state: S, callback?: () => any): void;
>setState : Symbol(Component.setState, Decl(file.tsx, 1, 39), Decl(file.tsx, 2, 72))
>state : Symbol(state, Decl(file.tsx, 3, 10))
>S : Symbol(S, Decl(file.tsx, 0, 26))
>callback : Symbol(callback, Decl(file.tsx, 3, 19))

	forceUpdate(callBack?: () => any): void;
>forceUpdate : Symbol(Component.forceUpdate, Decl(file.tsx, 3, 48))
>callBack : Symbol(callBack, Decl(file.tsx, 4, 13))

	render(): JSX.Element;
>render : Symbol(Component.render, Decl(file.tsx, 4, 41))
>JSX : Symbol(JSX, Decl(react.d.ts, 0, 0))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 0, 20))

	props: P;
>props : Symbol(Component.props, Decl(file.tsx, 5, 23))
>P : Symbol(P, Decl(file.tsx, 0, 24))

	state: S;
>state : Symbol(Component.state, Decl(file.tsx, 6, 10))
>S : Symbol(S, Decl(file.tsx, 0, 26))

	context: {};
>context : Symbol(Component.context, Decl(file.tsx, 7, 10))
}


interface ComponentClass<P> {
>ComponentClass : Symbol(ComponentClass, Decl(file.tsx, 9, 1))
>P : Symbol(P, Decl(file.tsx, 12, 25))

	new (props?: P, context?: any): Component<P, any>;
>props : Symbol(props, Decl(file.tsx, 13, 6))
>P : Symbol(P, Decl(file.tsx, 12, 25))
>context : Symbol(context, Decl(file.tsx, 13, 16))
>Component : Symbol(Component, Decl(file.tsx, 0, 0))
>P : Symbol(P, Decl(file.tsx, 12, 25))
}

declare module TestMod {
>TestMod : Symbol(TestMod, Decl(file.tsx, 14, 1))

	interface TestClass extends ComponentClass<{reqd: any}> {
>TestClass : Symbol(TestClass, Decl(file.tsx, 16, 24))
>ComponentClass : Symbol(ComponentClass, Decl(file.tsx, 9, 1))
>reqd : Symbol(reqd, Decl(file.tsx, 17, 45))
	}
	var Test: TestClass;
>Test : Symbol(Test, Decl(file.tsx, 19, 4))
>TestClass : Symbol(TestClass, Decl(file.tsx, 16, 24))
}

// Errors correctly
const T = TestMod.Test;
>T : Symbol(T, Decl(file.tsx, 23, 5))
>TestMod.Test : Symbol(TestMod.Test, Decl(file.tsx, 19, 4))
>TestMod : Symbol(TestMod, Decl(file.tsx, 14, 1))
>Test : Symbol(TestMod.Test, Decl(file.tsx, 19, 4))

var t1 = <T />;
>t1 : Symbol(t1, Decl(file.tsx, 24, 3))
>T : Symbol(T, Decl(file.tsx, 23, 5))

// Should error
var t2 = <TestMod.Test />;
>t2 : Symbol(t2, Decl(file.tsx, 27, 3))
>TestMod.Test : Symbol(TestMod.Test, Decl(file.tsx, 19, 4))
>TestMod : Symbol(TestMod, Decl(file.tsx, 14, 1))
>Test : Symbol(TestMod.Test, Decl(file.tsx, 19, 4))