342 lines
6.5 KiB
Plaintext
342 lines
6.5 KiB
Plaintext
=== tests/cases/conformance/jsx/jsxReactTestSuite.tsx ===
|
|
|
|
declare var React: any;
|
|
>React : any
|
|
|
|
declare var Component:any;
|
|
>Component : any
|
|
|
|
declare var Composite:any;
|
|
>Composite : any
|
|
|
|
declare var Composite2:any;
|
|
>Composite2 : any
|
|
|
|
declare var Child:any;
|
|
>Child : any
|
|
|
|
declare var Namespace:any;
|
|
>Namespace : any
|
|
|
|
declare var foo: any;
|
|
>foo : any
|
|
|
|
declare var bar: any;
|
|
>bar : any
|
|
|
|
declare var y:any;
|
|
>y : any
|
|
|
|
declare var x:any;
|
|
>x : any
|
|
|
|
declare var z:any;
|
|
>z : any
|
|
|
|
declare var hasOwnProperty:any;
|
|
>hasOwnProperty : any
|
|
|
|
<div>text</div>;
|
|
><div>text</div> : any
|
|
>div : any
|
|
>div : any
|
|
|
|
<div>
|
|
><div> {this.props.children}</div> : any
|
|
>div : any
|
|
|
|
{this.props.children}
|
|
>this.props.children : any
|
|
>this.props : any
|
|
>this : any
|
|
>props : any
|
|
>children : any
|
|
|
|
</div>;
|
|
>div : any
|
|
|
|
<div>
|
|
><div> <div><br /></div> <Component>{foo}<br />{bar}</Component> <br /></div> : any
|
|
>div : any
|
|
|
|
<div><br /></div>
|
|
><div><br /></div> : any
|
|
>div : any
|
|
><br /> : any
|
|
>br : any
|
|
>div : any
|
|
|
|
<Component>{foo}<br />{bar}</Component>
|
|
><Component>{foo}<br />{bar}</Component> : any
|
|
>Component : any
|
|
>foo : any
|
|
><br /> : any
|
|
>br : any
|
|
>bar : any
|
|
>Component : any
|
|
|
|
<br />
|
|
><br /> : any
|
|
>br : any
|
|
|
|
</div>;
|
|
>div : any
|
|
|
|
|
|
<Composite>
|
|
><Composite> {this.props.children}</Composite> : any
|
|
>Composite : any
|
|
|
|
{this.props.children}
|
|
>this.props.children : any
|
|
>this.props : any
|
|
>this : any
|
|
>props : any
|
|
>children : any
|
|
|
|
</Composite>;
|
|
>Composite : any
|
|
|
|
<Composite>
|
|
><Composite> <Composite2 /></Composite> : any
|
|
>Composite : any
|
|
|
|
<Composite2 />
|
|
><Composite2 /> : any
|
|
>Composite2 : any
|
|
|
|
</Composite>;
|
|
>Composite : any
|
|
|
|
var x =
|
|
>x : any
|
|
|
|
<div
|
|
><div attr1={ "foo" + "bar" } attr2={ "foo" + "bar" + "baz" + "bug" } attr3={ "foo" + "bar" + "baz" + "bug" // Extra line here. } attr4="baz"> </div> : any
|
|
>div : any
|
|
|
|
attr1={
|
|
>attr1 : string
|
|
|
|
"foo" + "bar"
|
|
>"foo" + "bar" : string
|
|
>"foo" : "foo"
|
|
>"bar" : "bar"
|
|
}
|
|
attr2={
|
|
>attr2 : string
|
|
|
|
"foo" + "bar" +
|
|
>"foo" + "bar" + "baz" + "bug" : string
|
|
>"foo" + "bar" + "baz" : string
|
|
>"foo" + "bar" : string
|
|
>"foo" : "foo"
|
|
>"bar" : "bar"
|
|
|
|
"baz" + "bug"
|
|
>"baz" : "baz"
|
|
>"bug" : "bug"
|
|
}
|
|
attr3={
|
|
>attr3 : string
|
|
|
|
"foo" + "bar" +
|
|
>"foo" + "bar" + "baz" + "bug" : string
|
|
>"foo" + "bar" + "baz" : string
|
|
>"foo" + "bar" : string
|
|
>"foo" : "foo"
|
|
>"bar" : "bar"
|
|
|
|
"baz" + "bug"
|
|
>"baz" : "baz"
|
|
>"bug" : "bug"
|
|
|
|
// Extra line here.
|
|
}
|
|
attr4="baz">
|
|
>attr4 : string
|
|
|
|
</div>;
|
|
>div : any
|
|
|
|
(
|
|
>( <div> {/* A comment at the beginning */} {/* A second comment at the beginning */} <span> {/* A nested comment */} </span> {/* A sandwiched comment */} <br /> {/* A comment at the end */} {/* A second comment at the end */} </div>) : any
|
|
|
|
<div>
|
|
><div> {/* A comment at the beginning */} {/* A second comment at the beginning */} <span> {/* A nested comment */} </span> {/* A sandwiched comment */} <br /> {/* A comment at the end */} {/* A second comment at the end */} </div> : any
|
|
>div : any
|
|
|
|
{/* A comment at the beginning */}
|
|
{/* A second comment at the beginning */}
|
|
<span>
|
|
><span> {/* A nested comment */} </span> : any
|
|
>span : any
|
|
|
|
{/* A nested comment */}
|
|
</span>
|
|
>span : any
|
|
|
|
{/* A sandwiched comment */}
|
|
<br />
|
|
><br /> : any
|
|
>br : any
|
|
|
|
{/* A comment at the end */}
|
|
{/* A second comment at the end */}
|
|
</div>
|
|
>div : any
|
|
|
|
);
|
|
|
|
(
|
|
>( <div /* a multi-line comment */ attr1="foo"> <span // a double-slash comment attr2="bar" /> </div>) : any
|
|
|
|
<div
|
|
><div /* a multi-line comment */ attr1="foo"> <span // a double-slash comment attr2="bar" /> </div> : any
|
|
>div : any
|
|
|
|
/* a multi-line
|
|
comment */
|
|
attr1="foo">
|
|
>attr1 : string
|
|
|
|
<span // a double-slash comment
|
|
><span // a double-slash comment attr2="bar" /> : any
|
|
>span : any
|
|
|
|
attr2="bar"
|
|
>attr2 : string
|
|
|
|
/>
|
|
</div>
|
|
>div : any
|
|
|
|
);
|
|
|
|
<div> </div>;
|
|
><div> </div> : any
|
|
>div : any
|
|
>div : any
|
|
|
|
<div> </div>;
|
|
><div> </div> : any
|
|
>div : any
|
|
>div : any
|
|
|
|
<hasOwnProperty>testing</hasOwnProperty>;
|
|
><hasOwnProperty>testing</hasOwnProperty> : any
|
|
>hasOwnProperty : any
|
|
>hasOwnProperty : any
|
|
|
|
<Component constructor="foo" />;
|
|
><Component constructor="foo" /> : any
|
|
>Component : any
|
|
>constructor : string
|
|
|
|
<Namespace.Component />;
|
|
><Namespace.Component /> : any
|
|
>Namespace.Component : any
|
|
>Namespace : any
|
|
>Component : any
|
|
|
|
<Namespace.DeepNamespace.Component />;
|
|
><Namespace.DeepNamespace.Component /> : any
|
|
>Namespace.DeepNamespace.Component : any
|
|
>Namespace.DeepNamespace : any
|
|
>Namespace : any
|
|
>DeepNamespace : any
|
|
>Component : any
|
|
|
|
<Component { ... x } y
|
|
><Component { ... x } y={2 } z /> : any
|
|
>Component : any
|
|
>x : any
|
|
>y : number
|
|
|
|
={2 } z />;
|
|
>2 : 2
|
|
>z : true
|
|
|
|
<Component
|
|
><Component {...this.props} sound="moo" /> : any
|
|
>Component : any
|
|
|
|
{...this.props} sound="moo" />;
|
|
>this.props : any
|
|
>this : any
|
|
>props : any
|
|
>sound : string
|
|
|
|
<font-face />;
|
|
><font-face /> : any
|
|
>font-face : any
|
|
|
|
<Component x={y} />;
|
|
><Component x={y} /> : any
|
|
>Component : any
|
|
>x : any
|
|
>y : any
|
|
|
|
<x-component />;
|
|
><x-component /> : any
|
|
>x-component : any
|
|
|
|
<Component {...x} />;
|
|
><Component {...x} /> : any
|
|
>Component : any
|
|
>x : any
|
|
|
|
<Component { ...x } y={2} />;
|
|
><Component { ...x } y={2} /> : any
|
|
>Component : any
|
|
>x : any
|
|
>y : number
|
|
>2 : 2
|
|
|
|
<Component { ... x } y={2} z />;
|
|
><Component { ... x } y={2} z /> : any
|
|
>Component : any
|
|
>x : any
|
|
>y : number
|
|
>2 : 2
|
|
>z : true
|
|
|
|
<Component x={1} {...y} />;
|
|
><Component x={1} {...y} /> : any
|
|
>Component : any
|
|
>x : number
|
|
>1 : 1
|
|
>y : any
|
|
|
|
|
|
<Component x={1} y="2" {...z} {...z}><Child /></Component>;
|
|
><Component x={1} y="2" {...z} {...z}><Child /></Component> : any
|
|
>Component : any
|
|
>x : number
|
|
>1 : 1
|
|
>y : string
|
|
>z : any
|
|
>z : any
|
|
><Child /> : any
|
|
>Child : any
|
|
>Component : any
|
|
|
|
<Component x="1" {...(z = { y: 2 }, z)} z={3}>Text</Component>;
|
|
><Component x="1" {...(z = { y: 2 }, z)} z={3}>Text</Component> : any
|
|
>Component : any
|
|
>x : string
|
|
>(z = { y: 2 }, z) : any
|
|
>z = { y: 2 }, z : any
|
|
>z = { y: 2 } : { y: number; }
|
|
>z : any
|
|
>{ y: 2 } : { y: number; }
|
|
>y : number
|
|
>2 : 2
|
|
>z : any
|
|
>z : number
|
|
>3 : 3
|
|
>Component : any
|
|
|
|
|
|
|