microsoft / microsoft/TypeScript
`isolatedDeclarations` quick-fix cannot consistently use auto-imports
@DanielRosenwasser ci sta già lavorando.
Dal 23/6/2026.
- #4412 di @copilot-swe-agent — chiusa senza merge
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
```ts
// @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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.