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
|
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
interface ButtonProp {
>ButtonProp : Symbol(ButtonProp, Decl(file.tsx, 0, 32))
a: number,
>a : Symbol(ButtonProp.a, Decl(file.tsx, 2, 22))
b: string,
>b : Symbol(ButtonProp.b, Decl(file.tsx, 3, 14))
children: Button;
>children : Symbol(ButtonProp.children, Decl(file.tsx, 4, 14))
>Button : Symbol(Button, Decl(file.tsx, 6, 1))
}
class Button extends React.Component<ButtonProp, any> {
>Button : Symbol(Button, Decl(file.tsx, 6, 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, 0, 32))
render() {
>render : Symbol(Button.render, Decl(file.tsx, 8, 55))
// Error children are specified twice
return (<InnerButton {...this.props} children="hi">
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1))
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>this : Symbol(Button, Decl(file.tsx, 6, 1))
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
>children : Symbol(children, Decl(file.tsx, 11, 44))
<div>Hello World</div>
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
</InnerButton>);
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 1))
}
}
interface InnerButtonProp {
>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 15, 1))
a: number
>a : Symbol(InnerButtonProp.a, Decl(file.tsx, 17, 27))
}
class InnerButton extends React.Component<InnerButtonProp, any> {
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 19, 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, 15, 1))
render() {
>render : Symbol(InnerButton.render, Decl(file.tsx, 21, 65))
return (<button>Hello</button>);
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
}
}
|