1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
=== tests/cases/conformance/jsx/file.tsx ===
declare module JSX {
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
interface Element { }
>Element : Symbol(Element, Decl(file.tsx, 0, 20))
interface ElementAttributesProperty { props: {} }
>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(file.tsx, 1, 22))
>props : Symbol(ElementAttributesProperty.props, Decl(file.tsx, 2, 38))
interface IntrinsicElements {
>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 2, 50))
div: any;
>div : Symbol(IntrinsicElements.div, Decl(file.tsx, 3, 30))
h2: any;
>h2 : Symbol(IntrinsicElements.h2, Decl(file.tsx, 4, 11))
h1: any;
>h1 : Symbol(IntrinsicElements.h1, Decl(file.tsx, 5, 10))
}
}
class Button {
>Button : Symbol(Button, Decl(file.tsx, 8, 1))
props: {}
>props : Symbol(Button.props, Decl(file.tsx, 10, 14))
render() {
>render : Symbol(Button.render, Decl(file.tsx, 11, 10))
return (<div>My Button</div>)
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
}
}
// OK
let k1 = <div> <h2> Hello </h2> <h1> world </h1></div>;
>k1 : Symbol(k1, Decl(file.tsx, 18, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(file.tsx, 5, 10))
>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(file.tsx, 5, 10))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
let k2 = <div> <h2> Hello </h2> {(user: any) => <h2>{user.name}</h2>}</div>;
>k2 : Symbol(k2, Decl(file.tsx, 19, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>user : Symbol(user, Decl(file.tsx, 19, 34))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>user : Symbol(user, Decl(file.tsx, 19, 34))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
let k3 = <div> {1} {"That is a number"} </div>;
>k3 : Symbol(k3, Decl(file.tsx, 20, 3))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
>div : Symbol(JSX.IntrinsicElements.div, Decl(file.tsx, 3, 30))
let k4 = <Button> <h2> Hello </h2> </Button>;
>k4 : Symbol(k4, Decl(file.tsx, 21, 3))
>Button : Symbol(Button, Decl(file.tsx, 8, 1))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>h2 : Symbol(JSX.IntrinsicElements.h2, Decl(file.tsx, 4, 11))
>Button : Symbol(Button, Decl(file.tsx, 8, 1))
|