|
| 1 | +=== tests/cases/conformance/jsx/file.tsx === |
| 2 | + |
| 3 | +import React = require('react'); |
| 4 | +>React : Symbol(React, Decl(file.tsx, 0, 0)) |
| 5 | + |
| 6 | +class RC1 extends React.Component<{x : number}, {}> { |
| 7 | +>RC1 : Symbol(RC1, Decl(file.tsx, 1, 32)) |
| 8 | +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 9 | +>React : Symbol(React, Decl(file.tsx, 0, 0)) |
| 10 | +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 11 | +>x : Symbol(x, Decl(file.tsx, 3, 35)) |
| 12 | + |
| 13 | + render() { |
| 14 | +>render : Symbol(RC1.render, Decl(file.tsx, 3, 53)) |
| 15 | + |
| 16 | + return null; |
| 17 | + } |
| 18 | +} |
| 19 | + |
| 20 | +class RC2 extends React.Component<{ x: string }, {}> { |
| 21 | +>RC2 : Symbol(RC2, Decl(file.tsx, 7, 1)) |
| 22 | +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 23 | +>React : Symbol(React, Decl(file.tsx, 0, 0)) |
| 24 | +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 25 | +>x : Symbol(x, Decl(file.tsx, 9, 35)) |
| 26 | + |
| 27 | + render() { |
| 28 | +>render : Symbol(RC2.render, Decl(file.tsx, 9, 54)) |
| 29 | + |
| 30 | + return null; |
| 31 | + } |
| 32 | + private method() { } |
| 33 | +>method : Symbol(RC2.method, Decl(file.tsx, 12, 5)) |
| 34 | +} |
| 35 | + |
| 36 | +class RC3 extends React.Component<{}, {}> { |
| 37 | +>RC3 : Symbol(RC3, Decl(file.tsx, 14, 1)) |
| 38 | +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 39 | +>React : Symbol(React, Decl(file.tsx, 0, 0)) |
| 40 | +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 41 | + |
| 42 | + render() { |
| 43 | +>render : Symbol(RC3.render, Decl(file.tsx, 16, 43)) |
| 44 | + |
| 45 | + return null; |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +class RC4 extends React.Component<{}, {}> { |
| 50 | +>RC4 : Symbol(RC4, Decl(file.tsx, 20, 1)) |
| 51 | +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 52 | +>React : Symbol(React, Decl(file.tsx, 0, 0)) |
| 53 | +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) |
| 54 | + |
| 55 | + render() { |
| 56 | +>render : Symbol(RC4.render, Decl(file.tsx, 22, 43)) |
| 57 | + |
| 58 | + return null; |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +var EmptyRCComp = RC3 || RC4; |
| 63 | +>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 28, 3)) |
| 64 | +>RC3 : Symbol(RC3, Decl(file.tsx, 14, 1)) |
| 65 | +>RC4 : Symbol(RC4, Decl(file.tsx, 20, 1)) |
| 66 | + |
| 67 | +var PartRCComp = RC1 || RC4; |
| 68 | +>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 29, 3)) |
| 69 | +>RC1 : Symbol(RC1, Decl(file.tsx, 1, 32)) |
| 70 | +>RC4 : Symbol(RC4, Decl(file.tsx, 20, 1)) |
| 71 | + |
| 72 | +var RCComp = RC1 || RC2; |
| 73 | +>RCComp : Symbol(RCComp, Decl(file.tsx, 30, 3)) |
| 74 | +>RC1 : Symbol(RC1, Decl(file.tsx, 1, 32)) |
| 75 | +>RC2 : Symbol(RC2, Decl(file.tsx, 7, 1)) |
| 76 | + |
| 77 | +// OK |
| 78 | +let a = <RCComp x="Hi" />; |
| 79 | +>a : Symbol(a, Decl(file.tsx, 32, 3)) |
| 80 | +>RCComp : Symbol(RCComp, Decl(file.tsx, 30, 3)) |
| 81 | +>x : Symbol(x, Decl(file.tsx, 32, 15)) |
| 82 | + |
| 83 | +let a1 = <EmptyRCComp />; |
| 84 | +>a1 : Symbol(a1, Decl(file.tsx, 33, 3)) |
| 85 | +>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 28, 3)) |
| 86 | + |
| 87 | +let a2 = <EmptyRCComp data-prop="hello" />; |
| 88 | +>a2 : Symbol(a2, Decl(file.tsx, 34, 3)) |
| 89 | +>EmptyRCComp : Symbol(EmptyRCComp, Decl(file.tsx, 28, 3)) |
| 90 | +>data-prop : Symbol(data-prop, Decl(file.tsx, 34, 21)) |
| 91 | + |
| 92 | +let b = <PartRCComp /> |
| 93 | +>b : Symbol(b, Decl(file.tsx, 35, 3)) |
| 94 | +>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 29, 3)) |
| 95 | + |
| 96 | +let c = <PartRCComp data-extra="hello" /> |
| 97 | +>c : Symbol(c, Decl(file.tsx, 36, 3)) |
| 98 | +>PartRCComp : Symbol(PartRCComp, Decl(file.tsx, 29, 3)) |
| 99 | +>data-extra : Symbol(data-extra, Decl(file.tsx, 36, 19)) |
| 100 | + |
0 commit comments