|
| 1 | +=== tests/cases/compiler/consumer.tsx === |
| 2 | +/// <reference path="component.d.ts" /> |
| 3 | +import BaseComponent from 'BaseComponent'; |
| 4 | +>BaseComponent : Symbol(BaseComponent, Decl(consumer.tsx, 1, 6)) |
| 5 | + |
| 6 | +class TestComponent extends React.Component<any, {}> { |
| 7 | +>TestComponent : Symbol(TestComponent, Decl(consumer.tsx, 1, 42)) |
| 8 | +>React.Component : Symbol(React.Component, Decl(component.d.ts, 4, 22)) |
| 9 | +>React : Symbol(React, Decl(component.d.ts, 3, 1)) |
| 10 | +>Component : Symbol(React.Component, Decl(component.d.ts, 4, 22)) |
| 11 | + |
| 12 | + render() { |
| 13 | +>render : Symbol(TestComponent.render, Decl(consumer.tsx, 2, 54)) |
| 14 | + |
| 15 | + return <BaseComponent />; |
| 16 | +>BaseComponent : Symbol(BaseComponent, Decl(consumer.tsx, 1, 6)) |
| 17 | + } |
| 18 | +} |
| 19 | + |
| 20 | +=== tests/cases/compiler/component.d.ts === |
| 21 | + |
| 22 | +declare module JSX { |
| 23 | +>JSX : Symbol(JSX, Decl(component.d.ts, 0, 0)) |
| 24 | + |
| 25 | + interface ElementAttributesProperty { props; } |
| 26 | +>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(component.d.ts, 1, 20)) |
| 27 | +>props : Symbol(ElementAttributesProperty.props, Decl(component.d.ts, 2, 39)) |
| 28 | +} |
| 29 | +declare module React { |
| 30 | +>React : Symbol(React, Decl(component.d.ts, 3, 1)) |
| 31 | + |
| 32 | + class Component<T, U> { } |
| 33 | +>Component : Symbol(Component, Decl(component.d.ts, 4, 22)) |
| 34 | +>T : Symbol(T, Decl(component.d.ts, 5, 18)) |
| 35 | +>U : Symbol(U, Decl(component.d.ts, 5, 20)) |
| 36 | +} |
| 37 | +declare module "BaseComponent" { |
| 38 | + export default class extends React.Component<any, {}> { |
| 39 | +>React.Component : Symbol(React.Component, Decl(component.d.ts, 4, 22)) |
| 40 | +>React : Symbol(React, Decl(component.d.ts, 3, 1)) |
| 41 | +>Component : Symbol(React.Component, Decl(component.d.ts, 4, 22)) |
| 42 | + } |
| 43 | +} |
| 44 | + |
0 commit comments