Relative reference in generated .d.ts file in a monorepo #26863
Labels
Bug
A bug in TypeScript
Domain: Declaration Emit
The issue relates to the emission of d.ts files
Fix Available
A PR has been opened for this issue
Milestone
When generating a .d.ts file, typescript is including a relative reference for an import, which is imported as a module.
generated a definition file:
In this case it is in a mono-repo which may be confusing things, but the reference should be the same as the import.
TypeScript Version:
3.0.3, but also happens with 3.1.0-dev.20180901
Search Terms:
relative reference paths
generated reference relative
Code
I have created a repo with a simple reproduction here https://github.com/wgcrouch/ts-bug
Expected behavior:
The reference
/// <reference types="@ts-bug/a" />
Actual behavior:
The reference generated is
/// <reference path="../../a/index.d.ts" />
Related Issues:
#26439
The text was updated successfully, but these errors were encountered: