mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
85 lines
2.9 KiB
Plaintext
85 lines
2.9 KiB
Plaintext
//// [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))
|
|
}
|
|
}
|
|
|