microsoft / microsoft/TypeScript
`isolatedDeclarations` quick-fix cannot consistently use auto-imports
@DanielRosenwasser đang làm issue này rồi.
Từ ngày 23/6/2026.
- #4412 của @copilot-swe-agent — đã đóng, không merge
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
```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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.