mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
//// [tests/cases/conformance/jsx/checkJsxChildrenProperty13.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))
|
|
|
|
// Error children are specified twice
|
|
return (<InnerButton {...this.props} children="hi">
|
|
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 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))
|
|
>children : Symbol(children, Decl(file.tsx, 13, 44))
|
|
|
|
<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, 21, 1))
|
|
}
|
|
}
|
|
|
|
interface InnerButtonProp {
|
|
>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 17, 1))
|
|
|
|
a: number
|
|
>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 19, 27))
|
|
}
|
|
|
|
class InnerButton extends React.Component<InnerButtonProp, any> {
|
|
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 21, 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, 17, 1))
|
|
|
|
render() {
|
|
>render : Symbol(InnerButton.render, Decl(file.tsx, 23, 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))
|
|
}
|
|
}
|
|
|