196 lines
3.5 KiB
Text
196 lines
3.5 KiB
Text
=== tests/cases/conformance/jsx/file.tsx ===
|
|
declare module JSX {
|
|
>JSX : any
|
|
|
|
interface Element { }
|
|
>Element : Element
|
|
|
|
interface IntrinsicElements {
|
|
>IntrinsicElements : IntrinsicElements
|
|
|
|
[s: string]: any;
|
|
>s : string
|
|
}
|
|
}
|
|
|
|
var p;
|
|
>p : any
|
|
|
|
var selfClosed1 = <div />;
|
|
>selfClosed1 : JSX.Element
|
|
><div /> : JSX.Element
|
|
>div : any
|
|
|
|
var selfClosed2 = <div x="1" />;
|
|
>selfClosed2 : JSX.Element
|
|
><div x="1" /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
|
|
var selfClosed3 = <div x='1' />;
|
|
>selfClosed3 : JSX.Element
|
|
><div x='1' /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
|
|
var selfClosed4 = <div x="1" y='0' />;
|
|
>selfClosed4 : JSX.Element
|
|
><div x="1" y='0' /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
>y : any
|
|
|
|
var selfClosed5 = <div x={0} y='0' />;
|
|
>selfClosed5 : JSX.Element
|
|
><div x={0} y='0' /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
>0 : number
|
|
>y : any
|
|
|
|
var selfClosed6 = <div x={"1"} y='0' />;
|
|
>selfClosed6 : JSX.Element
|
|
><div x={"1"} y='0' /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
>"1" : string
|
|
>y : any
|
|
|
|
var selfClosed7 = <div x={p} y='p' />;
|
|
>selfClosed7 : JSX.Element
|
|
><div x={p} y='p' /> : JSX.Element
|
|
>div : any
|
|
>x : any
|
|
>p : any
|
|
>y : any
|
|
|
|
var openClosed1 = <div></div>;
|
|
>openClosed1 : JSX.Element
|
|
><div></div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
var openClosed2 = <div n='m'>foo</div>;
|
|
>openClosed2 : JSX.Element
|
|
><div n='m'>foo</div> : JSX.Element
|
|
>div : any
|
|
>n : any
|
|
>div : any
|
|
|
|
var openClosed3 = <div n='m'>{p}</div>;
|
|
>openClosed3 : JSX.Element
|
|
><div n='m'>{p}</div> : JSX.Element
|
|
>div : any
|
|
>n : any
|
|
>p : any
|
|
>div : any
|
|
|
|
var openClosed4 = <div n='m'>{p < p}</div>;
|
|
>openClosed4 : JSX.Element
|
|
><div n='m'>{p < p}</div> : JSX.Element
|
|
>div : any
|
|
>n : any
|
|
>p < p : boolean
|
|
>p : any
|
|
>p : any
|
|
>div : any
|
|
|
|
var openClosed5 = <div n='m'>{p > p}</div>;
|
|
>openClosed5 : JSX.Element
|
|
><div n='m'>{p > p}</div> : JSX.Element
|
|
>div : any
|
|
>n : any
|
|
>p > p : boolean
|
|
>p : any
|
|
>p : any
|
|
>div : any
|
|
|
|
class SomeClass {
|
|
>SomeClass : SomeClass
|
|
|
|
f() {
|
|
>f : () => void
|
|
|
|
var rewrites1 = <div>{() => this}</div>;
|
|
>rewrites1 : JSX.Element
|
|
><div>{() => this}</div> : JSX.Element
|
|
>div : any
|
|
>() => this : () => this
|
|
>this : this
|
|
>div : any
|
|
|
|
var rewrites2 = <div>{[p, ...p, p]}</div>;
|
|
>rewrites2 : JSX.Element
|
|
><div>{[p, ...p, p]}</div> : JSX.Element
|
|
>div : any
|
|
>[p, ...p, p] : any[]
|
|
>p : any
|
|
>...p : any
|
|
>p : any
|
|
>p : any
|
|
>div : any
|
|
|
|
var rewrites3 = <div>{{p}}</div>;
|
|
>rewrites3 : JSX.Element
|
|
><div>{{p}}</div> : JSX.Element
|
|
>div : any
|
|
>{p} : { p: any; }
|
|
>p : any
|
|
>div : any
|
|
|
|
var rewrites4 = <div a={() => this}></div>;
|
|
>rewrites4 : JSX.Element
|
|
><div a={() => this}></div> : JSX.Element
|
|
>div : any
|
|
>a : any
|
|
>() => this : () => this
|
|
>this : this
|
|
>div : any
|
|
|
|
var rewrites5 = <div a={[p, ...p, p]}></div>;
|
|
>rewrites5 : JSX.Element
|
|
><div a={[p, ...p, p]}></div> : JSX.Element
|
|
>div : any
|
|
>a : any
|
|
>[p, ...p, p] : any[]
|
|
>p : any
|
|
>...p : any
|
|
>p : any
|
|
>p : any
|
|
>div : any
|
|
|
|
var rewrites6 = <div a={{p}}></div>;
|
|
>rewrites6 : JSX.Element
|
|
><div a={{p}}></div> : JSX.Element
|
|
>div : any
|
|
>a : any
|
|
>{p} : { p: any; }
|
|
>p : any
|
|
>div : any
|
|
}
|
|
}
|
|
|
|
var whitespace1 = <div> </div>;
|
|
>whitespace1 : JSX.Element
|
|
><div> </div> : JSX.Element
|
|
>div : any
|
|
>div : any
|
|
|
|
var whitespace2 = <div> {p} </div>;
|
|
>whitespace2 : JSX.Element
|
|
><div> {p} </div> : JSX.Element
|
|
>div : any
|
|
>p : any
|
|
>div : any
|
|
|
|
var whitespace3 = <div>
|
|
>whitespace3 : JSX.Element
|
|
><div> {p} </div> : JSX.Element
|
|
>div : any
|
|
|
|
{p}
|
|
>p : any
|
|
|
|
</div>;
|
|
>div : any
|
|
|