Skip to content

import() in d.ts files can't be resolved if used as template argument of other import()'ed type #24562

Closed
@asvetliakov

Description

@asvetliakov

TypeScript Version: 2.9.1

Search Terms: declaration

Code
test1.d.ts

export interface T<P> {
    a: P;
}

test2.d.ts

export declare const theme: { a: string }

test3.d.ts

export declare const a: import("./test1").T<import("./test2").theme>;

Expected behavior:
Compiles correctly

Actual behavior:

test3.d.ts:1:45 - error TS2307: Cannot find module './test2'.

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions