forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckJsxChildrenProperty12.symbols
More file actions
84 lines (65 loc) · 2.88 KB
/
checkJsxChildrenProperty12.symbols
File metadata and controls
84 lines (65 loc) · 2.88 KB
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
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty12.tsx] ////
=== file.tsx ===
/// <reference path="react.d.ts" />
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ButtonProp {
>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
a: number,
>a : Symbol(ButtonProp.a, Decl(file.tsx, 4, 22))
b: string,
>b : Symbol(ButtonProp.b, Decl(file.tsx, 5, 14))
children: Button;
>children : Symbol(ButtonProp.children, Decl(file.tsx, 6, 14))
>Button : Symbol(Button, Decl(file.tsx, 8, 1))
}
class Button extends React.Component<ButtonProp, any> {
>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 2, 32))
render() {
>render : Symbol(Button.render, Decl(file.tsx, 10, 55))
let condition: boolean;
>condition : Symbol(condition, Decl(file.tsx, 12, 5))
if (condition) {
>condition : Symbol(condition, Decl(file.tsx, 12, 5))
return <InnerButton {...this.props} />
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>this : Symbol(Button, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
}
else {
return (<InnerButton {...this.props} >
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>this : Symbol(Button, Decl(file.tsx, 8, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
<div>Hello World</div>
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2402, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2402, 45))
</InnerButton>);
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
}
}
}
interface InnerButtonProp {
>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1))
a: number
>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 24, 27))
}
class InnerButton extends React.Component<InnerButtonProp, any> {
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 26, 1))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 22, 1))
render() {
>render : Symbol(InnerButton.render, Decl(file.tsx, 28, 65))
return (<button>Hello</button>);
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2388, 43))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2388, 43))
}
}