* Type side of import types * Value side of import types * Accept library changes * Refined implementation, more tests * Allow resolutions to be performed late if the resolution still results in a file already in the build * Add another test case * Add some jsdoc usages * Allow nodebuilder to use import types where appropriate * Parse & check generic instantiations * use import types in nodebuilder for typeof module symbols * Wire up go to definition for import types * Accept updated type/symbol baselines now that symbols are wired in * PR feedback * Fix changes from merge * Walk back late import handling * Remove unused diagnostic * Remove unrelated changes * Use recursive function over loop * Emit type arguments * undo unrelated change * Test for and support import type nodes in bundled declaration emit
48 lines
1.1 KiB
Text
48 lines
1.1 KiB
Text
=== 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 {
|
|
>JSX : any
|
|
|
|
interface ElementAttributesProperty { props; }
|
|
>ElementAttributesProperty : ElementAttributesProperty
|
|
>props : any
|
|
}
|
|
declare module React {
|
|
>React : typeof React
|
|
|
|
class Component<T, U> { }
|
|
>Component : Component<T, U>
|
|
>T : T
|
|
>U : U
|
|
}
|
|
declare module "BaseComponent" {
|
|
>"BaseComponent" : typeof import("BaseComponent")
|
|
|
|
var base: React.Component<any, {}>;
|
|
>base : React.Component<any, {}>
|
|
>React : any
|
|
>Component : React.Component<T, U>
|
|
|
|
export = base;
|
|
>base : React.Component<any, {}>
|
|
}
|
|
|