tsc 2.9.x generating incorrect type definitions for import types #25278
Labels
Bug
A bug in TypeScript
Domain: Declaration Emit
The issue relates to the emission of d.ts files
Fixed
A PR has been merged for this issue
Milestone
tldr; when using the new import types feature of tsc 2.9, there are certain circumstances where the
import(
part is missing.Version: 3.0.0-dev.20180626
Code
See https://github.com/jrf0110/tsc-declaration-bug/blob/master/workspaces/button-consumer/dist/index.d.ts#L2 for a full example
Expected behavior:
Actual behavior:
Playground Link: https://github.com/jrf0110/tsc-declaration-bug
Additional Info
We saw this come up using yarn workspaces. I'm not exactly sure if using yarn workspaces is required to reproduce. Nonetheless, this definitely seems like a bug with tsc itself.
I suspect this has something to do with importing from
.d.ts
files that declare a module, as is the case in the linked example.The text was updated successfully, but these errors were encountered: