Update baselines
This commit is contained in:
parent
463e385db6
commit
4bab55f4ba
|
@ -13,8 +13,8 @@ interface Prop {
|
|||
|
||||
children: string | JSX.Element
|
||||
>children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
}
|
||||
|
||||
function Comp(p: Prop) {
|
||||
|
@ -23,11 +23,11 @@ function Comp(p: Prop) {
|
|||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
|
||||
return <div>{p.b}</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>p : Symbol(p, Decl(file.tsx, 8, 14))
|
||||
>b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
// OK
|
||||
|
@ -59,8 +59,8 @@ let k2 =
|
|||
>b : Symbol(b, Decl(file.tsx, 19, 16))
|
||||
|
||||
<div>hi hi hi!</div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
</Comp>;
|
||||
>Comp : Symbol(Comp, Decl(file.tsx, 6, 1))
|
||||
|
|
|
@ -18,9 +18,9 @@ interface ButtonProp {
|
|||
|
||||
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))
|
||||
>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))
|
||||
>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() {
|
||||
|
@ -34,20 +34,20 @@ class Button extends React.Component<ButtonProp, any> {
|
|||
|
||||
return <InnerButton {...this.props} />
|
||||
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>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, 166, 37))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
}
|
||||
else {
|
||||
return (<InnerButton {...this.props} >
|
||||
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>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, 166, 37))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
|
||||
<div>Hello World</div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>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, 24, 1))
|
||||
|
@ -64,17 +64,17 @@ interface InnerButtonProp {
|
|||
|
||||
class InnerButton extends React.Component<InnerButtonProp, any> {
|
||||
>InnerButton : Symbol(InnerButton, Decl(file.tsx, 24, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>InnerButtonProp : Symbol(InnerButtonProp, Decl(file.tsx, 20, 1))
|
||||
|
||||
render() {
|
||||
>render : Symbol(InnerButton.render, Decl(file.tsx, 26, 65))
|
||||
|
||||
return (<button>Hello</button>);
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,34 +16,34 @@ interface IFetchUserProps {
|
|||
>children : Symbol(IFetchUserProps.children, Decl(file.tsx, 6, 27))
|
||||
>user : Symbol(user, Decl(file.tsx, 7, 15))
|
||||
>IUser : Symbol(IUser, Decl(file.tsx, 0, 32))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
}
|
||||
|
||||
class FetchUser extends React.Component<IFetchUserProps, any> {
|
||||
>FetchUser : Symbol(FetchUser, Decl(file.tsx, 8, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>IFetchUserProps : Symbol(IFetchUserProps, Decl(file.tsx, 4, 1))
|
||||
|
||||
render() {
|
||||
>render : Symbol(FetchUser.render, Decl(file.tsx, 10, 63))
|
||||
|
||||
return this.state
|
||||
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 173, 44))
|
||||
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
|
||||
>this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
|
||||
>state : Symbol(React.Component.state, Decl(react.d.ts, 173, 44))
|
||||
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
|
||||
|
||||
? this.props.children(this.state.result)
|
||||
>this.props.children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 173, 20))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>this.props.children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 173, 20))
|
||||
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 173, 44))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>children : Symbol(children, Decl(file.tsx, 6, 27), Decl(react.d.ts, 174, 20))
|
||||
>this.state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
|
||||
>this : Symbol(FetchUser, Decl(file.tsx, 8, 1))
|
||||
>state : Symbol(React.Component.state, Decl(react.d.ts, 173, 44))
|
||||
>state : Symbol(React.Component.state, Decl(react.d.ts, 174, 44))
|
||||
|
||||
: null;
|
||||
}
|
||||
|
@ -61,11 +61,11 @@ function UserName0() {
|
|||
>user : Symbol(user, Decl(file.tsx, 22, 13))
|
||||
|
||||
<h1>{ user.Name }</h1>
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
|
||||
>user : Symbol(user, Decl(file.tsx, 22, 13))
|
||||
>Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
|
||||
) }
|
||||
</FetchUser>
|
||||
|
@ -85,11 +85,11 @@ function UserName1() {
|
|||
>user : Symbol(user, Decl(file.tsx, 33, 13))
|
||||
|
||||
<h1>{ user.Name }</h1>
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>user.Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
|
||||
>user : Symbol(user, Decl(file.tsx, 33, 13))
|
||||
>Name : Symbol(IUser.Name, Decl(file.tsx, 2, 17))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
|
||||
) }
|
||||
</FetchUser>
|
||||
|
|
|
@ -13,24 +13,24 @@ interface Prop {
|
|||
|
||||
children: JSX.Element | JSX.Element[];
|
||||
>children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
}
|
||||
|
||||
class Button extends React.Component<any, any> {
|
||||
>Button : Symbol(Button, Decl(file.tsx, 6, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Button.render, Decl(file.tsx, 8, 48))
|
||||
|
||||
return (<div>My Button</div>)
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ function AnotherButton(p: any) {
|
|||
>p : Symbol(p, Decl(file.tsx, 14, 23))
|
||||
|
||||
return <h1>Just Another Button</h1>;
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
}
|
||||
|
||||
function Comp(p: Prop) {
|
||||
|
@ -49,11 +49,11 @@ function Comp(p: Prop) {
|
|||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
|
||||
return <div>{p.b}</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>p : Symbol(p, Decl(file.tsx, 18, 14))
|
||||
>b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
// Ok
|
||||
|
|
|
@ -13,24 +13,24 @@ interface Prop {
|
|||
|
||||
children: string | JSX.Element | (string | JSX.Element)[];
|
||||
>children : Symbol(Prop.children, Decl(file.tsx, 4, 14))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
}
|
||||
|
||||
class Button extends React.Component<any, any> {
|
||||
>Button : Symbol(Button, Decl(file.tsx, 6, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Button.render, Decl(file.tsx, 8, 48))
|
||||
|
||||
return (<div>My Button</div>)
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ function AnotherButton(p: any) {
|
|||
>p : Symbol(p, Decl(file.tsx, 14, 23))
|
||||
|
||||
return <h1>Just Another Button</h1>;
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
}
|
||||
|
||||
function Comp(p: Prop) {
|
||||
|
@ -49,11 +49,11 @@ function Comp(p: Prop) {
|
|||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
|
||||
return <div>{p.b}</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>p : Symbol(p, Decl(file.tsx, 18, 14))
|
||||
>b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
// OK
|
||||
|
|
|
@ -5,26 +5,26 @@ import React = require('react');
|
|||
// OK
|
||||
let k1 = <div> <h2> Hello </h2> <h1> world </h1></div>;
|
||||
>k1 : Symbol(k1, Decl(file.tsx, 3, 3))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
let k2 = <div> <h2> Hello </h2> {(user: any) => <h2>{user.name}</h2>}</div>;
|
||||
>k2 : Symbol(k2, Decl(file.tsx, 4, 3))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>user : Symbol(user, Decl(file.tsx, 4, 34))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>user : Symbol(user, Decl(file.tsx, 4, 34))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2410, 48))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(react.d.ts, 2411, 48))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
let k3 = <div> {1} {"That is a number"} </div>;
|
||||
>k3 : Symbol(k3, Decl(file.tsx, 5, 3))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@ import React = require('react');
|
|||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
|
||||
<div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
// Not Comment
|
||||
</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
<div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
// Not Comment
|
||||
{
|
||||
|
@ -18,10 +18,10 @@ import React = require('react');
|
|||
}
|
||||
// Another not Comment
|
||||
</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
<div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
// Not Comment
|
||||
{
|
||||
|
@ -30,10 +30,10 @@ import React = require('react');
|
|||
}
|
||||
// Another not Comment
|
||||
</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
<div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
/* Not Comment */
|
||||
{
|
||||
|
@ -41,5 +41,5 @@ import React = require('react');
|
|||
"Hi"
|
||||
}
|
||||
</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
|
|
|
@ -11,17 +11,17 @@ let buttonProps; // any
|
|||
|
||||
let k = <button {...buttonProps}>
|
||||
>k : Symbol(k, Decl(0.tsx, 5, 3))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
|
||||
|
||||
<span className={cx('class1', { class2: true })} />
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>className : Symbol(className, Decl(0.tsx, 6, 17))
|
||||
>cx : Symbol(cx, Decl(0.tsx, 1, 6))
|
||||
>class2 : Symbol(class2, Decl(0.tsx, 6, 43))
|
||||
|
||||
</button>;
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
|
||||
=== tests/cases/conformance/jsx/declaration.d.ts ===
|
||||
declare module "classnames";
|
||||
|
|
|
@ -12,17 +12,17 @@ let buttonProps : {[attributeName: string]: ''}
|
|||
|
||||
let k = <button {...buttonProps}>
|
||||
>k : Symbol(k, Decl(0.tsx, 5, 3))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
|
||||
|
||||
<span className={cx('class1', { class2: true })} />
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>className : Symbol(className, Decl(0.tsx, 6, 17))
|
||||
>cx : Symbol(cx, Decl(0.tsx, 1, 6))
|
||||
>class2 : Symbol(class2, Decl(0.tsx, 6, 43))
|
||||
|
||||
</button>;
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
|
||||
=== tests/cases/conformance/jsx/declaration.d.ts ===
|
||||
declare module "classnames";
|
||||
|
|
|
@ -11,17 +11,17 @@ let buttonProps;
|
|||
|
||||
let k = <button {...buttonProps}>
|
||||
>k : Symbol(k, Decl(0.tsx, 5, 3))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
|
||||
|
||||
<span className={cx('class1', { class2: true })} />
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>className : Symbol(className, Decl(0.tsx, 6, 17))
|
||||
>cx : Symbol(cx, Decl(0.tsx, 1, 6))
|
||||
>class2 : Symbol(class2, Decl(0.tsx, 6, 43))
|
||||
|
||||
</button>;
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
|
||||
=== tests/cases/conformance/jsx/declaration.d.ts ===
|
||||
declare module "classnames";
|
||||
|
|
|
@ -12,7 +12,7 @@ let buttonProps : {[attributeName: string]: ''}
|
|||
|
||||
let k = <button {...buttonProps} className={cx('class1', { class2: true })} />;
|
||||
>k : Symbol(k, Decl(0.tsx, 5, 3))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>buttonProps : Symbol(buttonProps, Decl(0.tsx, 4, 3))
|
||||
>className : Symbol(className, Decl(0.tsx, 5, 32))
|
||||
>cx : Symbol(cx, Decl(0.tsx, 1, 6))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(11,21): error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }' has no properties in common with '{ prop1: "hello"; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -14,7 +15,8 @@ tests/cases/conformance/jsx/file.tsx(11,21): error TS2339: Property 'prop1' does
|
|||
// Error
|
||||
let a = <BigGreeter prop1="hello" />
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }' has no properties in common with '{ prop1: "hello"; }'.
|
||||
|
||||
// OK
|
||||
let b = <BigGreeter ref={(input) => { this.textInput = input; }} />
|
||||
|
|
|
@ -35,9 +35,9 @@ type Properties = CanadianAddress | AmericanAddress;
|
|||
|
||||
export class AddressComp extends React.Component<Properties, void> {
|
||||
>AddressComp : Symbol(AddressComp, Decl(file.tsx, 15, 52))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>Properties : Symbol(Properties, Decl(file.tsx, 13, 1))
|
||||
|
||||
public render() {
|
||||
|
|
|
@ -10,17 +10,17 @@ interface Prop {
|
|||
}
|
||||
class Poisoned extends React.Component<Prop, {}> {
|
||||
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Poisoned.render, Decl(file.tsx, 5, 50))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,17 +10,17 @@ interface Prop {
|
|||
}
|
||||
class Poisoned extends React.Component<Prop, {}> {
|
||||
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 4, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Poisoned.render, Decl(file.tsx, 5, 50))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ const decorator = function <T>(Component: React.StatelessComponent<T>): React.St
|
|||
>T : Symbol(T, Decl(file.tsx, 2, 28))
|
||||
>Component : Symbol(Component, Decl(file.tsx, 2, 31))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 28))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 28))
|
||||
|
||||
return (props) => <Component {...props}></Component>
|
||||
|
@ -27,10 +27,10 @@ const decorator2 = function <T extends { x: number }>(Component: React.Stateless
|
|||
>x : Symbol(x, Decl(file.tsx, 6, 40))
|
||||
>Component : Symbol(Component, Decl(file.tsx, 6, 54))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 6, 29))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 6, 29))
|
||||
|
||||
return (props) => <Component {...props} x={2} ></Component>
|
||||
|
@ -50,10 +50,10 @@ const decorator3 = function <T extends { x: number }, U extends { x: number } >(
|
|||
>x : Symbol(x, Decl(file.tsx, 10, 65))
|
||||
>Component : Symbol(Component, Decl(file.tsx, 10, 80))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 10, 29))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>T : Symbol(T, Decl(file.tsx, 10, 29))
|
||||
|
||||
return (props) => <Component x={2} {...props} ></Component>
|
||||
|
|
|
@ -7,25 +7,25 @@ class B1<T extends { x: string } = { x:string } > extends React.Component<T, {}>
|
|||
>T : Symbol(T, Decl(file.tsx, 2, 9))
|
||||
>x : Symbol(x, Decl(file.tsx, 2, 20))
|
||||
>x : Symbol(x, Decl(file.tsx, 2, 36))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 9))
|
||||
|
||||
render() {
|
||||
>render : Symbol(B1.render, Decl(file.tsx, 2, 82))
|
||||
|
||||
return <div>hi</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
class B<U> extends React.Component<U, {}> {
|
||||
>B : Symbol(B, Decl(file.tsx, 6, 1))
|
||||
>U : Symbol(U, Decl(file.tsx, 7, 8))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>U : Symbol(U, Decl(file.tsx, 7, 8))
|
||||
|
||||
render() {
|
||||
|
@ -33,9 +33,9 @@ class B<U> extends React.Component<U, {}> {
|
|||
|
||||
return <B1 {...this.props} x="hi" />;
|
||||
>B1 : Symbol(B1, Decl(file.tsx, 0, 32))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>this : Symbol(B, Decl(file.tsx, 6, 1))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>x : Symbol(x, Decl(file.tsx, 9, 34))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(12,36): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(12,20): error TS2322: Type 'U & { x: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }' has no properties in common with 'U & { x: "hi"; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -14,7 +15,8 @@ tests/cases/conformance/jsx/file.tsx(12,36): error TS2339: Property 'x' does not
|
|||
render() {
|
||||
// Should be an ok but as of 2.3.3 this will be an error as we will instantiate B1.props to be empty object
|
||||
return <B1 {...this.props} x="hi" />;
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }'.
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'U & { x: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<B1<{}>> & { children?: ReactNode; }' has no properties in common with 'U & { x: "hi"; }'.
|
||||
}
|
||||
}
|
|
@ -7,25 +7,25 @@ class B1<T extends { x: string } = { x:string } > extends React.Component<T, {}>
|
|||
>T : Symbol(T, Decl(file.tsx, 2, 9))
|
||||
>x : Symbol(x, Decl(file.tsx, 2, 20))
|
||||
>x : Symbol(x, Decl(file.tsx, 2, 36))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 9))
|
||||
|
||||
render() {
|
||||
>render : Symbol(B1.render, Decl(file.tsx, 2, 82))
|
||||
|
||||
return <div>hi</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
class B<U> extends React.Component<U, {}> {
|
||||
>B : Symbol(B, Decl(file.tsx, 6, 1))
|
||||
>U : Symbol(U, Decl(file.tsx, 7, 8))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>U : Symbol(U, Decl(file.tsx, 7, 8))
|
||||
|
||||
props: U;
|
||||
|
|
|
@ -7,8 +7,8 @@ declare function Component<T>(props: T) : JSX.Element;
|
|||
>T : Symbol(T, Decl(file.tsx, 2, 27))
|
||||
>props : Symbol(props, Decl(file.tsx, 2, 30))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
const decorator = function <U>(props: U) {
|
||||
>decorator : Symbol(decorator, Decl(file.tsx, 3, 5))
|
||||
|
|
|
@ -7,8 +7,8 @@ declare function Component<T>(props: T) : JSX.Element;
|
|||
>T : Symbol(T, Decl(file.tsx, 2, 27))
|
||||
>props : Symbol(props, Decl(file.tsx, 2, 30))
|
||||
>T : Symbol(T, Decl(file.tsx, 2, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
const decorator = function <U>(props: U) {
|
||||
>decorator : Symbol(decorator, Decl(file.tsx, 3, 5))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//// [file.tsx]
|
||||
import React = require('react');
|
||||
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>): React.ComponentClass<P> {
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>) {
|
||||
return class extends React.PureComponent<P, void> {
|
||||
public render(): JSX.Element {
|
||||
return (
|
||||
|
@ -9,7 +9,9 @@ export function makeP<P>(Ctor: React.ComponentClass<P>): React.ComponentClass<P>
|
|||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//// [file.jsx]
|
||||
"use strict";
|
||||
|
|
|
@ -2,36 +2,35 @@
|
|||
import React = require('react');
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>): React.ComponentClass<P> {
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>) {
|
||||
>makeP : Symbol(makeP, Decl(file.tsx, 0, 32))
|
||||
>P : Symbol(P, Decl(file.tsx, 2, 22))
|
||||
>Ctor : Symbol(Ctor, Decl(file.tsx, 2, 25))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
|
||||
>P : Symbol(P, Decl(file.tsx, 2, 22))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
|
||||
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5))
|
||||
>P : Symbol(P, Decl(file.tsx, 2, 22))
|
||||
|
||||
return class extends React.PureComponent<P, void> {
|
||||
>React.PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 179, 5))
|
||||
>React.PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 180, 5))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 179, 5))
|
||||
>PureComponent : Symbol(React.PureComponent, Decl(react.d.ts, 180, 5))
|
||||
>P : Symbol(P, Decl(file.tsx, 2, 22))
|
||||
|
||||
public render(): JSX.Element {
|
||||
>render : Symbol((Anonymous class).render, Decl(file.tsx, 3, 52))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
return (
|
||||
<Ctor {...this.props } />
|
||||
>Ctor : Symbol(Ctor, Decl(file.tsx, 2, 25))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>this : Symbol((Anonymous class), Decl(file.tsx, 3, 7))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
import React = require('react');
|
||||
>React : typeof React
|
||||
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>): React.ComponentClass<P> {
|
||||
>makeP : <P>(Ctor: React.ComponentClass<P>) => React.ComponentClass<P>
|
||||
export function makeP<P>(Ctor: React.ComponentClass<P>) {
|
||||
>makeP : <P>(Ctor: React.ComponentClass<P>) => typeof (Anonymous class)
|
||||
>P : P
|
||||
>Ctor : React.ComponentClass<P>
|
||||
>React : any
|
||||
>ComponentClass : React.ComponentClass<P>
|
||||
>P : P
|
||||
>React : any
|
||||
>ComponentClass : React.ComponentClass<P>
|
||||
>P : P
|
||||
|
||||
return class extends React.PureComponent<P, void> {
|
||||
|
@ -39,3 +36,5 @@ export function makeP<P>(Ctor: React.ComponentClass<P>): React.ComponentClass<P>
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ declare class MyComp<P = Prop> extends React.Component<P, {}> {
|
|||
>MyComp : Symbol(MyComp, Decl(file.tsx, 5, 1))
|
||||
>P : Symbol(P, Decl(file.tsx, 7, 21))
|
||||
>Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>P : Symbol(P, Decl(file.tsx, 7, 21))
|
||||
|
||||
internalProp: P;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
tests/cases/conformance/jsx/file.tsx(16,17): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(17,18): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(16,17): error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
|
||||
|
@ -19,8 +21,10 @@ tests/cases/conformance/jsx/file.tsx(17,18): error TS2339: Property 'a' does not
|
|||
|
||||
// Error
|
||||
let x = <MyComp a={10} b="hi" />
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }' has no properties in common with '{ a: 10; b: "hi"; }'.
|
||||
let x2 = <MyComp a="hi"/>
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }' has no properties in common with '{ a: "hi"; }'.
|
|
@ -4,16 +4,16 @@ import React = require('react');
|
|||
|
||||
class Poisoned extends React.Component<{}, {}> {
|
||||
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 0, 32))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Poisoned.render, Decl(file.tsx, 2, 48))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,17 +39,17 @@ interface Prop {
|
|||
|
||||
class OverWriteAttr extends React.Component<Prop, {}> {
|
||||
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
|
||||
|
||||
render() {
|
||||
>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ function ChildComponent({ property1 }: AnotherComponentProps) {
|
|||
|
||||
return (
|
||||
<span>{property1}</span>
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>property1 : Symbol(property1, Decl(file.tsx, 23, 25))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
|
||||
);
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@ function AnotherComponent({ property1 }: AnotherComponentProps) {
|
|||
|
||||
return (
|
||||
<span>{property1}</span>
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>property1 : Symbol(property1, Decl(file.tsx, 19, 27))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
|
||||
);
|
||||
}
|
||||
|
|
|
@ -14,17 +14,17 @@ interface PoisonedProp {
|
|||
|
||||
class Poisoned extends React.Component<PoisonedProp, {}> {
|
||||
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,17 +14,17 @@ interface PoisonedProp {
|
|||
|
||||
class Poisoned extends React.Component<PoisonedProp, {}> {
|
||||
>Poisoned : Symbol(Poisoned, Decl(file.tsx, 5, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>PoisonedProp : Symbol(PoisonedProp, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Poisoned.render, Decl(file.tsx, 7, 58))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,16 +48,16 @@ let p = <Poisoned {...obj} />;
|
|||
|
||||
class EmptyProp extends React.Component<{}, {}> {
|
||||
>EmptyProp : Symbol(EmptyProp, Decl(file.tsx, 19, 30))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(EmptyProp.render, Decl(file.tsx, 21, 49))
|
||||
|
||||
return <div>Default hi</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,11 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
|
|||
Type '{ x: string; y: number; }' is not assignable to type 'PoisonedProp'.
|
||||
Types of property 'y' are incompatible.
|
||||
Type 'number' is not assignable to type '2'.
|
||||
tests/cases/conformance/jsx/file.tsx(33,20): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
|
||||
import React = require('react');
|
||||
|
||||
interface PoisonedProp {
|
||||
|
@ -42,4 +44,7 @@ tests/cases/conformance/jsx/file.tsx(20,19): error TS2322: Type '{ x: string; y:
|
|||
prop1: false
|
||||
}
|
||||
// Ok
|
||||
let e = <EmptyProp {...o} />;
|
||||
let e = <EmptyProp {...o} />;
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<EmptyProp> & { children?: ReactNode; }' has no properties in common with '{ prop1: boolean; }'.
|
|
@ -13,17 +13,17 @@ type TextProps = { editable: false }
|
|||
|
||||
class TextComponent extends React.Component<TextProps, {}> {
|
||||
>TextComponent : Symbol(TextComponent, Decl(file.tsx, 3, 71))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>TextProps : Symbol(TextProps, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(TextComponent.render, Decl(file.tsx, 5, 60))
|
||||
|
||||
return <span>Some Text..</span>;
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2460, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2461, 51))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,17 +36,17 @@ interface Prop {
|
|||
|
||||
class OverWriteAttr extends React.Component<Prop, {}> {
|
||||
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
|
||||
|
||||
render() {
|
||||
>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,17 +14,17 @@ interface OptionProp {
|
|||
|
||||
class Opt extends React.Component<OptionProp, {}> {
|
||||
>Opt : Symbol(Opt, Decl(file.tsx, 5, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>OptionProp : Symbol(OptionProp, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
>render : Symbol(Opt.render, Decl(file.tsx, 7, 51))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JS
|
|||
|
||||
// OK
|
||||
const e1 = <TestingOptional />
|
||||
const e2 = <TestingOptional extra-prop/>
|
||||
const e3 = <TestingOptional y1="hello"/>
|
||||
const e4 = <TestingOptional y1="hello" y2={1000} />
|
||||
const e5 = <TestingOptional y1 y3/>
|
||||
const e6 = <TestingOptional y1 y3 y2={10} />
|
||||
const e2 = <TestingOptional y1 y3 extra-prop/>
|
||||
|
||||
|
||||
|
||||
|
@ -60,9 +60,9 @@ define(["require", "exports", "react"], function (require, exports, React) {
|
|||
var d5 = <TestingOneThing extra-data="hello" yy="hello" name="Bob"/>;
|
||||
// OK
|
||||
var e1 = <TestingOptional />;
|
||||
var e2 = <TestingOptional extra-prop/>;
|
||||
var e3 = <TestingOptional y1="hello"/>;
|
||||
var e4 = <TestingOptional y1="hello" y2={1000}/>;
|
||||
var e5 = <TestingOptional y1 y3/>;
|
||||
var e6 = <TestingOptional y1 y3 y2={10}/>;
|
||||
var e2 = <TestingOptional y1 y3 extra-prop/>;
|
||||
});
|
||||
|
|
|
@ -6,24 +6,24 @@ declare function OneThing(k: {yxx: string}): JSX.Element;
|
|||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
|
||||
>k : Symbol(k, Decl(file.tsx, 2, 26))
|
||||
>yxx : Symbol(yxx, Decl(file.tsx, 2, 30))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OneThing(k: {yxx1: string, children: string}): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
|
||||
>k : Symbol(k, Decl(file.tsx, 3, 26))
|
||||
>yxx1 : Symbol(yxx1, Decl(file.tsx, 3, 30))
|
||||
>children : Symbol(children, Decl(file.tsx, 3, 43))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
|
||||
>l : Symbol(l, Decl(file.tsx, 4, 26))
|
||||
>yy : Symbol(yy, Decl(file.tsx, 4, 30))
|
||||
>yy1 : Symbol(yy1, Decl(file.tsx, 4, 41))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
|
||||
|
@ -31,15 +31,15 @@ declare function OneThing(l: {yy: number, yy1: string, yy2: boolean}): JSX.Eleme
|
|||
>yy : Symbol(yy, Decl(file.tsx, 5, 30))
|
||||
>yy1 : Symbol(yy1, Decl(file.tsx, 5, 41))
|
||||
>yy2 : Symbol(yy2, Decl(file.tsx, 5, 54))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OneThing(l1: {data: string, "data-prop": boolean}): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 57), Decl(file.tsx, 3, 76), Decl(file.tsx, 4, 69), Decl(file.tsx, 5, 83))
|
||||
>l1 : Symbol(l1, Decl(file.tsx, 6, 26))
|
||||
>data : Symbol(data, Decl(file.tsx, 6, 31))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
const c1 = <OneThing yxx='ok' />
|
||||
|
@ -76,31 +76,31 @@ declare function TestingOneThing({y1: string}): JSX.Element;
|
|||
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
|
||||
>y1 : Symbol(y1)
|
||||
>string : Symbol(string, Decl(file.tsx, 16, 34))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function TestingOneThing(j: {"extra-data": string, yy?: string}): JSX.Element;
|
||||
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
|
||||
>j : Symbol(j, Decl(file.tsx, 17, 33))
|
||||
>yy : Symbol(yy, Decl(file.tsx, 17, 58))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function TestingOneThing(n: {yy: number, direction?: number}): JSX.Element;
|
||||
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
|
||||
>n : Symbol(n, Decl(file.tsx, 18, 33))
|
||||
>yy : Symbol(yy, Decl(file.tsx, 18, 37))
|
||||
>direction : Symbol(direction, Decl(file.tsx, 18, 48))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function TestingOneThing(n: {yy: string, name: string}): JSX.Element;
|
||||
>TestingOneThing : Symbol(TestingOneThing, Decl(file.tsx, 13, 47), Decl(file.tsx, 16, 60), Decl(file.tsx, 17, 86), Decl(file.tsx, 18, 83))
|
||||
>n : Symbol(n, Decl(file.tsx, 19, 33))
|
||||
>yy : Symbol(yy, Decl(file.tsx, 19, 37))
|
||||
>name : Symbol(name, Decl(file.tsx, 19, 48))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
const d1 = <TestingOneThing y1 extra-data />;
|
||||
|
@ -140,8 +140,8 @@ declare function TestingOptional(a: {y1?: string, y2?: number}): JSX.Element;
|
|||
>a : Symbol(a, Decl(file.tsx, 29, 33))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 29, 37))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 29, 49))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JSX.Element;
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
|
@ -149,42 +149,44 @@ declare function TestingOptional(a: {y1: boolean, y2?: number, y3: boolean}): JS
|
|||
>y1 : Symbol(y1, Decl(file.tsx, 30, 37))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 30, 49))
|
||||
>y3 : Symbol(y3, Decl(file.tsx, 30, 62))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
const e1 = <TestingOptional />
|
||||
>e1 : Symbol(e1, Decl(file.tsx, 33, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
|
||||
const e2 = <TestingOptional extra-prop/>
|
||||
>e2 : Symbol(e2, Decl(file.tsx, 34, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>extra-prop : Symbol(extra-prop, Decl(file.tsx, 34, 27))
|
||||
|
||||
const e3 = <TestingOptional y1="hello"/>
|
||||
>e3 : Symbol(e3, Decl(file.tsx, 35, 5))
|
||||
>e3 : Symbol(e3, Decl(file.tsx, 34, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 35, 27))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 34, 27))
|
||||
|
||||
const e4 = <TestingOptional y1="hello" y2={1000} />
|
||||
>e4 : Symbol(e4, Decl(file.tsx, 36, 5))
|
||||
>e4 : Symbol(e4, Decl(file.tsx, 35, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 36, 27))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 36, 38))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 35, 27))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 35, 38))
|
||||
|
||||
const e5 = <TestingOptional y1 y3/>
|
||||
>e5 : Symbol(e5, Decl(file.tsx, 37, 5))
|
||||
>e5 : Symbol(e5, Decl(file.tsx, 36, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 36, 27))
|
||||
>y3 : Symbol(y3, Decl(file.tsx, 36, 30))
|
||||
|
||||
const e6 = <TestingOptional y1 y3 y2={10} />
|
||||
>e6 : Symbol(e6, Decl(file.tsx, 37, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 37, 27))
|
||||
>y3 : Symbol(y3, Decl(file.tsx, 37, 30))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 37, 33))
|
||||
|
||||
const e6 = <TestingOptional y1 y3 y2={10} />
|
||||
>e6 : Symbol(e6, Decl(file.tsx, 38, 5))
|
||||
const e2 = <TestingOptional y1 y3 extra-prop/>
|
||||
>e2 : Symbol(e2, Decl(file.tsx, 38, 5))
|
||||
>TestingOptional : Symbol(TestingOptional, Decl(file.tsx, 26, 72), Decl(file.tsx, 29, 77))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 38, 27))
|
||||
>y3 : Symbol(y3, Decl(file.tsx, 38, 30))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 38, 33))
|
||||
>extra-prop : Symbol(extra-prop, Decl(file.tsx, 38, 33))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -171,12 +171,6 @@ const e1 = <TestingOptional />
|
|||
><TestingOptional /> : JSX.Element
|
||||
>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
|
||||
|
||||
const e2 = <TestingOptional extra-prop/>
|
||||
>e2 : JSX.Element
|
||||
><TestingOptional extra-prop/> : JSX.Element
|
||||
>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
|
||||
>extra-prop : true
|
||||
|
||||
const e3 = <TestingOptional y1="hello"/>
|
||||
>e3 : JSX.Element
|
||||
><TestingOptional y1="hello"/> : JSX.Element
|
||||
|
@ -207,5 +201,13 @@ const e6 = <TestingOptional y1 y3 y2={10} />
|
|||
>y2 : number
|
||||
>10 : 10
|
||||
|
||||
const e2 = <TestingOptional y1 y3 extra-prop/>
|
||||
>e2 : JSX.Element
|
||||
><TestingOptional y1 y3 extra-prop/> : JSX.Element
|
||||
>TestingOptional : { (a: { y1?: string; y2?: number; }): JSX.Element; (a: { y1: boolean; y2?: number; y3: boolean; }): JSX.Element; }
|
||||
>y1 : true
|
||||
>y3 : true
|
||||
>extra-prop : true
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@ import React = require('react')
|
|||
|
||||
declare function OneThing(): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OneThing(l: {yy: number, yy1: string}): JSX.Element;
|
||||
>OneThing : Symbol(OneThing, Decl(file.tsx, 0, 31), Decl(file.tsx, 1, 41))
|
||||
>l : Symbol(l, Decl(file.tsx, 2, 26))
|
||||
>yy : Symbol(yy, Decl(file.tsx, 2, 30))
|
||||
>yy1 : Symbol(yy1, Decl(file.tsx, 2, 41))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
let obj = {
|
||||
>obj : Symbol(obj, Decl(file.tsx, 4, 3))
|
||||
|
|
|
@ -7,8 +7,8 @@ interface Context {
|
|||
}
|
||||
declare function ZeroThingOrTwoThing(): JSX.Element;
|
||||
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Context): JSX.Element;
|
||||
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
|
||||
|
@ -17,8 +17,8 @@ declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Cont
|
|||
>yy1 : Symbol(yy1, Decl(file.tsx, 4, 52))
|
||||
>context : Symbol(context, Decl(file.tsx, 4, 66))
|
||||
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
let obj2: any;
|
||||
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
|
||||
|
@ -55,15 +55,15 @@ declare function ThreeThing(l: {y1: string}): JSX.Element;
|
|||
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
|
||||
>l : Symbol(l, Decl(file.tsx, 15, 28))
|
||||
>y1 : Symbol(y1, Decl(file.tsx, 15, 32))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function ThreeThing(l: {y2: string}): JSX.Element;
|
||||
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
|
||||
>l : Symbol(l, Decl(file.tsx, 16, 28))
|
||||
>y2 : Symbol(y2, Decl(file.tsx, 16, 32))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, updater: any): JSX.Element;
|
||||
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
|
||||
|
@ -73,8 +73,8 @@ declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, upda
|
|||
>context : Symbol(context, Decl(file.tsx, 17, 57))
|
||||
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
|
||||
>updater : Symbol(updater, Decl(file.tsx, 17, 75))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
const three1 = <ThreeThing yy={99} yy1="hello world" />;
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface ButtonProps extends ClickableProps {
|
|||
onClick: React.MouseEventHandler<any>;
|
||||
>onClick : Symbol(ButtonProps.onClick, Decl(file.tsx, 7, 53))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 388, 66))
|
||||
>MouseEventHandler : Symbol(React.MouseEventHandler, Decl(react.d.ts, 389, 66))
|
||||
}
|
||||
|
||||
export interface LinkProps extends ClickableProps {
|
||||
|
@ -60,22 +60,22 @@ export function MainButton(buttonProps: ButtonProps): JSX.Element;
|
|||
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
|
||||
>buttonProps : Symbol(buttonProps, Decl(file.tsx, 28, 27))
|
||||
>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
export function MainButton(linkProps: LinkProps): JSX.Element;
|
||||
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
|
||||
>linkProps : Symbol(linkProps, Decl(file.tsx, 29, 27))
|
||||
>LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
export function MainButton(hyphenProps: HyphenProps): JSX.Element;
|
||||
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
|
||||
>hyphenProps : Symbol(hyphenProps, Decl(file.tsx, 30, 27))
|
||||
>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
export function MainButton(props: ButtonProps | LinkProps | HyphenProps): JSX.Element {
|
||||
>MainButton : Symbol(MainButton, Decl(file.tsx, 26, 1), Decl(file.tsx, 28, 66), Decl(file.tsx, 29, 62), Decl(file.tsx, 30, 66))
|
||||
|
@ -83,8 +83,8 @@ export function MainButton(props: ButtonProps | LinkProps | HyphenProps): JSX.El
|
|||
>ButtonProps : Symbol(ButtonProps, Decl(file.tsx, 5, 1))
|
||||
>LinkProps : Symbol(LinkProps, Decl(file.tsx, 9, 1))
|
||||
>HyphenProps : Symbol(HyphenProps, Decl(file.tsx, 13, 1))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
const linkProps = props as LinkProps;
|
||||
>linkProps : Symbol(linkProps, Decl(file.tsx, 32, 9))
|
||||
|
|
|
@ -17,8 +17,8 @@ function MyComponent<T = MyComponentProp>(attr: T) {
|
|||
>T : Symbol(T, Decl(file.tsx, 6, 21))
|
||||
|
||||
return <div>attr.values</div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
// OK
|
||||
|
|
|
@ -5,16 +5,21 @@ tests/cases/conformance/jsx/file.tsx(27,15): error TS2322: Type '{ name: 42; }'
|
|||
Type '{ name: 42; }' is not assignable to type '{ name?: string; }'.
|
||||
Types of property 'name' are incompatible.
|
||||
Type '42' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(29,15): error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'.
|
||||
Type '{}' is not assignable to type '{ "prop-name": string; }'.
|
||||
Property '"prop-name"' is missing in type '{}'.
|
||||
tests/cases/conformance/jsx/file.tsx(37,23): error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(38,24): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
||||
tests/cases/conformance/jsx/file.tsx(45,24): error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (7 errors) ====
|
||||
==== tests/cases/conformance/jsx/file.tsx (8 errors) ====
|
||||
function EmptyPropSFC() {
|
||||
return <div> Default Greeting </div>;
|
||||
}
|
||||
|
@ -54,7 +59,8 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
// Error
|
||||
let f = <Meet naaaaaaame='no' />;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ naaaaaaame: "no"; }'.
|
||||
|
||||
// OK
|
||||
let g = <MeetAndGreet prop-name="Bob" />;
|
||||
|
@ -68,10 +74,12 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
// Error
|
||||
let i = <EmptyPropSFC prop1 />
|
||||
~~~~~
|
||||
!!! error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: true; }'.
|
||||
let i1 = <EmptyPropSFC ref={x => x.greeting.substr(10)} />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ ref: (x: any) => any; }'.
|
||||
|
||||
let o = {
|
||||
prop1: true;
|
||||
|
@ -81,6 +89,9 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
|
||||
// OK as access properties are allow when spread
|
||||
let i2 = <EmptyPropSFC {...o} />
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ prop1: boolean; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ prop1: boolean; }'.
|
||||
|
||||
let o1: any;
|
||||
// OK
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(19,16): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(25,42): error TS2339: Property 'subtr' does not exist on type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(27,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
|
||||
tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'.
|
||||
|
@ -25,7 +26,8 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot
|
|||
// Error - not allowed to specify 'ref' on SFCs
|
||||
let c = <Greet ref="myRef" />;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & { name?: string; }' has no properties in common with '{ ref: "myRef"; }'.
|
||||
|
||||
|
||||
// OK - ref is valid for classes
|
||||
|
|
|
@ -5,7 +5,7 @@ import React = require('react');
|
|||
const Foo = (props: any) => <div/>;
|
||||
>Foo : Symbol(Foo, Decl(file.tsx, 2, 5))
|
||||
>props : Symbol(props, Decl(file.tsx, 2, 13))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
// Should be OK
|
||||
const foo = <Foo />;
|
||||
|
@ -17,31 +17,31 @@ const foo = <Foo />;
|
|||
var MainMenu: React.StatelessComponent<{}> = (props) => (<div>
|
||||
>MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>props : Symbol(props, Decl(file.tsx, 8, 46))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
<h3>Main Menu</h3>
|
||||
>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2411, 48))
|
||||
>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2411, 48))
|
||||
>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2412, 48))
|
||||
>h3 : Symbol(JSX.IntrinsicElements.h3, Decl(react.d.ts, 2412, 48))
|
||||
|
||||
</div>);
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
var App: React.StatelessComponent<{ children }> = ({children}) => (
|
||||
>App : Symbol(App, Decl(file.tsx, 12, 3))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>children : Symbol(children, Decl(file.tsx, 12, 35))
|
||||
>children : Symbol(children, Decl(file.tsx, 12, 52))
|
||||
|
||||
<div >
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
<MainMenu/>
|
||||
>MainMenu : Symbol(MainMenu, Decl(file.tsx, 8, 3))
|
||||
|
||||
</div>
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
);
|
||||
|
|
|
@ -11,8 +11,8 @@ declare function ComponentWithTwoAttributes<K,V>(l: {key1: K, value: V}): JSX.El
|
|||
>K : Symbol(K, Decl(file.tsx, 2, 44))
|
||||
>value : Symbol(value, Decl(file.tsx, 2, 61))
|
||||
>V : Symbol(V, Decl(file.tsx, 2, 46))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
function Baz<T,U>(key1: T, value: U) {
|
||||
|
@ -48,8 +48,8 @@ declare function Link<U>(l: {func: (arg: U)=>void}): JSX.Element;
|
|||
>func : Symbol(func, Decl(file.tsx, 10, 29))
|
||||
>arg : Symbol(arg, Decl(file.tsx, 10, 36))
|
||||
>U : Symbol(U, Decl(file.tsx, 10, 22))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
function createLink(func: (a: number)=>void) {
|
||||
|
@ -97,8 +97,8 @@ declare function InferParamComponent<T>(attr: InferParamProp<T>): JSX.Element;
|
|||
>attr : Symbol(attr, Decl(file.tsx, 26, 40))
|
||||
>InferParamProp : Symbol(InferParamProp, Decl(file.tsx, 19, 1))
|
||||
>T : Symbol(T, Decl(file.tsx, 26, 37))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
let i = <InferParamComponent values={[1, 2, 3, 4]} selectHandler={(val) => { }} />;
|
||||
|
|
|
@ -5,8 +5,8 @@ import React = require('react')
|
|||
declare function OverloadComponent<U>(): JSX.Element;
|
||||
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
|
||||
>U : Symbol(U, Decl(file.tsx, 2, 35))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OverloadComponent<U>(attr: {b: U, a?: string, "ignore-prop": boolean}): JSX.Element;
|
||||
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
|
||||
|
@ -15,8 +15,8 @@ declare function OverloadComponent<U>(attr: {b: U, a?: string, "ignore-prop": bo
|
|||
>b : Symbol(b, Decl(file.tsx, 3, 45))
|
||||
>U : Symbol(U, Decl(file.tsx, 3, 35))
|
||||
>a : Symbol(a, Decl(file.tsx, 3, 50))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function OverloadComponent<T, U>(attr: {b: U, a: T}): JSX.Element;
|
||||
>OverloadComponent : Symbol(OverloadComponent, Decl(file.tsx, 0, 31), Decl(file.tsx, 2, 53), Decl(file.tsx, 3, 101))
|
||||
|
@ -27,8 +27,8 @@ declare function OverloadComponent<T, U>(attr: {b: U, a: T}): JSX.Element;
|
|||
>U : Symbol(U, Decl(file.tsx, 4, 37))
|
||||
>a : Symbol(a, Decl(file.tsx, 4, 53))
|
||||
>T : Symbol(T, Decl(file.tsx, 4, 35))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
// OK
|
||||
function Baz<T extends {b: number}, U extends {a: boolean, b:string}>(arg1: T, arg2: U) {
|
||||
|
@ -93,8 +93,8 @@ declare function Link<U>(l: {func: (arg: U)=>void}): JSX.Element;
|
|||
>func : Symbol(func, Decl(file.tsx, 17, 29))
|
||||
>arg : Symbol(arg, Decl(file.tsx, 17, 36))
|
||||
>U : Symbol(U, Decl(file.tsx, 17, 22))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
declare function Link<U>(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element;
|
||||
>Link : Symbol(Link, Decl(file.tsx, 15, 1), Decl(file.tsx, 17, 65))
|
||||
|
@ -104,8 +104,8 @@ declare function Link<U>(l: {func: (arg1:U, arg2: string)=>void}): JSX.Element;
|
|||
>arg1 : Symbol(arg1, Decl(file.tsx, 18, 36))
|
||||
>U : Symbol(U, Decl(file.tsx, 18, 22))
|
||||
>arg2 : Symbol(arg2, Decl(file.tsx, 18, 43))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2352, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2355, 27))
|
||||
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
|
||||
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
|
||||
|
||||
function createLink(func: (a: number)=>void) {
|
||||
>createLink : Symbol(createLink, Decl(file.tsx, 18, 79))
|
||||
|
|
|
@ -8,8 +8,8 @@ function SFC1(prop: { x: number }) {
|
|||
>x : Symbol(x, Decl(file.tsx, 2, 21))
|
||||
|
||||
return <div>hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
|
||||
};
|
||||
|
||||
|
@ -19,8 +19,8 @@ function SFC2(prop: { x: boolean }) {
|
|||
>x : Symbol(x, Decl(file.tsx, 6, 21))
|
||||
|
||||
return <h1>World </h1>;
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
}
|
||||
|
||||
var SFCComp = SFC1 || SFC2;
|
||||
|
|
|
@ -4,9 +4,9 @@ import React = require('react');
|
|||
|
||||
class RC1 extends React.Component<{x : number}, {}> {
|
||||
>RC1 : Symbol(RC1, Decl(file.tsx, 0, 32))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>x : Symbol(x, Decl(file.tsx, 2, 35))
|
||||
|
||||
render() {
|
||||
|
@ -18,9 +18,9 @@ class RC1 extends React.Component<{x : number}, {}> {
|
|||
|
||||
class RC2 extends React.Component<{ x: string }, {}> {
|
||||
>RC2 : Symbol(RC2, Decl(file.tsx, 6, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>x : Symbol(x, Decl(file.tsx, 8, 35))
|
||||
|
||||
render() {
|
||||
|
@ -34,9 +34,9 @@ class RC2 extends React.Component<{ x: string }, {}> {
|
|||
|
||||
class RC3 extends React.Component<{}, {}> {
|
||||
>RC3 : Symbol(RC3, Decl(file.tsx, 13, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(RC3.render, Decl(file.tsx, 15, 43))
|
||||
|
@ -47,9 +47,9 @@ class RC3 extends React.Component<{}, {}> {
|
|||
|
||||
class RC4 extends React.Component<{}, {}> {
|
||||
>RC4 : Symbol(RC4, Decl(file.tsx, 19, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
|
||||
render() {
|
||||
>render : Symbol(RC4.render, Decl(file.tsx, 21, 43))
|
||||
|
|
|
@ -3,8 +3,10 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i
|
|||
Type '{ x: true; }' is not assignable to type '{ x: string; }'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'true' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(33,21): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,22): error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
|
||||
|
@ -48,8 +50,10 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2339: Property 'prop' does
|
|||
!!! error TS2322: Type 'true' is not assignable to type 'string'.
|
||||
let b = <PartRCComp x={10} />
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }' has no properties in common with '{ x: 10; }'.
|
||||
let c = <EmptyRCComp prop />;
|
||||
~~~~
|
||||
!!! error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }' has no properties in common with '{ prop: true; }'.
|
||||
|
|
@ -6,16 +6,16 @@ function EmptySFC1() {
|
|||
>EmptySFC1 : Symbol(EmptySFC1, Decl(file.tsx, 0, 32))
|
||||
|
||||
return <div>hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
function EmptySFC2() {
|
||||
>EmptySFC2 : Symbol(EmptySFC2, Decl(file.tsx, 4, 1))
|
||||
|
||||
return <div>Hello</div>;
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2399, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
|
||||
}
|
||||
|
||||
function SFC2(prop: { x: boolean }) {
|
||||
|
@ -24,8 +24,8 @@ function SFC2(prop: { x: boolean }) {
|
|||
>x : Symbol(x, Decl(file.tsx, 10, 21))
|
||||
|
||||
return <h1>World</h1>;
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2409, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react.d.ts, 2410, 47))
|
||||
}
|
||||
|
||||
var EmptySFCComp = EmptySFC1 || EmptySFC2;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(18,23): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
|
||||
Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'.
|
||||
Types of property 'x' are incompatible.
|
||||
|
@ -31,7 +32,8 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi
|
|||
// Error
|
||||
let a = <EmptySFCComp x />;
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Weak type 'IntrinsicAttributes' has no properties in common with '{ x: true; }'.
|
||||
let b = <SFC2AndEmptyComp x="hi" />;
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
|
||||
|
|
|
@ -8,16 +8,16 @@ interface ComponentProps {
|
|||
AnyComponent: React.StatelessComponent<any> | React.ComponentClass<any>;
|
||||
>AnyComponent : Symbol(ComponentProps.AnyComponent, Decl(file.tsx, 2, 26))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 197, 40))
|
||||
>StatelessComponent : Symbol(React.StatelessComponent, Decl(react.d.ts, 198, 40))
|
||||
>React : Symbol(React, Decl(file.tsx, 0, 0))
|
||||
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 204, 5))
|
||||
>ComponentClass : Symbol(React.ComponentClass, Decl(react.d.ts, 205, 5))
|
||||
}
|
||||
|
||||
class MyComponent extends React.Component<ComponentProps, {}> {
|
||||
>MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
>ComponentProps : Symbol(ComponentProps, Decl(file.tsx, 0, 32))
|
||||
|
||||
render() {
|
||||
|
@ -25,9 +25,9 @@ class MyComponent extends React.Component<ComponentProps, {}> {
|
|||
|
||||
const { AnyComponent } = this.props;
|
||||
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 8, 15))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>this.props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
>this : Symbol(MyComponent, Decl(file.tsx, 4, 1))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 166, 37))
|
||||
>props : Symbol(React.Component.props, Decl(react.d.ts, 167, 37))
|
||||
|
||||
return (<AnyComponent />);
|
||||
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 8, 15))
|
||||
|
@ -38,15 +38,15 @@ class MyComponent extends React.Component<ComponentProps, {}> {
|
|||
<MyComponent AnyComponent={() => <button>test</button>}/>
|
||||
>MyComponent : Symbol(MyComponent, Decl(file.tsx, 4, 1))
|
||||
>AnyComponent : Symbol(AnyComponent, Decl(file.tsx, 14, 12))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2385, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
>button : Symbol(JSX.IntrinsicElements.button, Decl(react.d.ts, 2386, 43))
|
||||
|
||||
// Component Class as Props
|
||||
class MyButtonComponent extends React.Component<{},{}> {
|
||||
>MyButtonComponent : Symbol(MyButtonComponent, Decl(file.tsx, 14, 57))
|
||||
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55))
|
||||
>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))
|
||||
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
|
||||
}
|
||||
|
||||
<MyComponent AnyComponent={MyButtonComponent} />
|
||||
|
|
Loading…
Reference in a new issue