43 lines
1,011 B
Plaintext
43 lines
1,011 B
Plaintext
=== tests/cases/compiler/consumer.tsx ===
|
|
/// <reference path="component.d.ts" />
|
|
import BaseComponent = require('BaseComponent');
|
|
>BaseComponent : React.Component<any, {}>
|
|
|
|
class TestComponent extends React.Component<any, {}> {
|
|
>TestComponent : TestComponent
|
|
>React.Component : React.Component<any, {}>
|
|
>React : typeof React
|
|
>Component : typeof React.Component
|
|
|
|
render() {
|
|
>render : () => any
|
|
|
|
return <BaseComponent />;
|
|
><BaseComponent /> : any
|
|
>BaseComponent : React.Component<any, {}>
|
|
}
|
|
}
|
|
|
|
=== tests/cases/compiler/component.d.ts ===
|
|
declare module JSX {
|
|
interface ElementAttributesProperty { props; }
|
|
>props : any
|
|
}
|
|
declare module React {
|
|
>React : typeof React
|
|
|
|
class Component<T, U> { }
|
|
>Component : Component<T, U>
|
|
}
|
|
declare module "BaseComponent" {
|
|
>"BaseComponent" : typeof import("BaseComponent")
|
|
|
|
var base: React.Component<any, {}>;
|
|
>base : React.Component<any, {}>
|
|
>React : any
|
|
|
|
export = base;
|
|
>base : React.Component<any, {}>
|
|
}
|
|
|