microsoft / microsoft/TypeScript
`isolatedDeclarations` quick-fix cannot consistently use auto-imports
Open
@DanielRosenwasser is already working on this.
Since Jun 23, 2026.
- #4412 by @copilot-swe-agent — closed without merging
Bug
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
// @module: preserve
// @isolatedDeclarations: true
// @Filename: types.ts
export type Thing = {};
// @Filename: funcs.ts
import type { Thing } from "./types";
export function makeThing(): Thing {
throw {};
}
// @Filename: exporter.ts
import { makeThing } from "./funcs";
export let thing = makeThing();
The test has isolatedDeclarations set to true, so export let thing needs an annotation.
Ordinarily, we have a best-effort import adder for Thing which works if Thing is available through an existing import; but because exporter.ts doesn't import types.ts, it doesn't work in this case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.