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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
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), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>x : Symbol(x, Decl(file.tsx, 2, 35))
render() {
>render : Symbol(RC1.render, Decl(file.tsx, 2, 53))
return null;
}
}
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), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>x : Symbol(x, Decl(file.tsx, 8, 35))
render() {
>render : Symbol(RC2.render, Decl(file.tsx, 8, 54))
return null;
}
private method() { }
>method : Symbol(RC2.method, Decl(file.tsx, 11, 5))
}
class RC3 extends React.Component<{}, {}> {
>RC3 : Symbol(RC3, Decl(file.tsx, 13, 1))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(RC3.render, Decl(file.tsx, 15, 43))
return null;
}
}
class RC4 extends React.Component<{}, {}> {
>RC4 : Symbol(RC4, Decl(file.tsx, 19, 1))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
render() {
>render : Symbol(RC4.render, Decl(file.tsx, 21, 43))
return null;
}
}
var EmptyRCComp = RC3 || RC4;
>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 27, 3))
>RC3 : Symbol(RC3, Decl(file.tsx, 13, 1))
>RC4 : Symbol(RC4, Decl(file.tsx, 19, 1))
var PartRCComp = RC1 || RC4;
>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 28, 3))
>RC1 : Symbol(RC1, Decl(file.tsx, 0, 32))
>RC4 : Symbol(RC4, Decl(file.tsx, 19, 1))
var RCComp = RC1 || RC2;
>RCComp : Symbol(RCComp, Decl(file.tsx, 29, 3))
>RC1 : Symbol(RC1, Decl(file.tsx, 0, 32))
>RC2 : Symbol(RC2, Decl(file.tsx, 6, 1))
// OK
let a = <RCComp x="Hi" />;
>a : Symbol(a, Decl(file.tsx, 31, 3))
>RCComp : Symbol(RCComp, Decl(file.tsx, 29, 3))
>x : Symbol(x, Decl(file.tsx, 31, 15))
let a1 = <EmptyRCComp />;
>a1 : Symbol(a1, Decl(file.tsx, 32, 3))
>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 27, 3))
let a2 = <EmptyRCComp data-prop="hello" />;
>a2 : Symbol(a2, Decl(file.tsx, 33, 3))
>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 27, 3))
>data-prop : Symbol(data-prop, Decl(file.tsx, 33, 21))
let b = <PartRCComp />
>b : Symbol(b, Decl(file.tsx, 34, 3))
>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 28, 3))
let c = <PartRCComp data-extra="hello" />
>c : Symbol(c, Decl(file.tsx, 35, 3))
>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 28, 3))
>data-extra : Symbol(data-extra, Decl(file.tsx, 35, 19))
|