TypeScript/tests/cases/compiler/declarationsForInferredTypeFromOtherFile.ts
Wesley Wigham 3fc727b256
Use import types to refer to declarations in declaration emit (#24071)
* Stand up a simple implementation using import types for exports of modules which are otherwise inaccessible

* Ensure references exist to link to modules containing utilized ambient modules

* Accept baselines with new import type usage

* Fix lint
2018-05-17 13:08:22 -07:00

13 lines
269 B
TypeScript

// @declaration: true
// @filename: file1.ts
export class Foo {}
// @filename: file2.ts
export function foo(): import("./file1").Foo {
return null as any;
}
// @filename: file3.ts
import {foo} from "./file2";
export function bar() {
return foo();
}