TypeScript/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts
Wesley Wigham d9b93903c0
Use more nodelike paths for import types when possible (#24610)
* Use more nodelike paths for import types when possible

* move functionality from services into compiler, fix with propert file/directory conflict handling

* mark suspect cast
2018-06-05 12:54:36 -07:00

24 lines
816 B
TypeScript

// @declaration: true
// @filename: r/node_modules/foo/node_modules/nested/index.d.ts
export interface NestedProps {}
// @filename: r/node_modules/foo/other/index.d.ts
export interface OtherIndexProps {}
// @filename: r/node_modules/foo/other.d.ts
export interface OtherProps {}
// @filename: r/node_modules/foo/index.d.ts
import { OtherProps } from "./other";
import { OtherIndexProps } from "./other/index";
import { NestedProps } from "nested";
export interface SomeProps {}
export function foo(): [SomeProps, OtherProps, OtherIndexProps, NestedProps];
// @filename: node_modules/root/index.d.ts
export interface RootProps {}
export function bar(): RootProps;
// @filename: r/entry.ts
import { foo } from "foo";
import { bar } from "root";
export const x = foo();
export const y = bar();