microsoft / microsoft/TypeScript
`isolatedDeclarations` quick-fix cannot consistently use auto-imports
Offen
@DanielRosenwasser arbeitet bereits daran.
Seit 23.6.2026.
- #4412 von @copilot-swe-agent — ohne Merge geschlossen
Bug
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
// @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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.