microsoft / microsoft/TypeScript
Duplicate imports when using "Update Imports On Paste"
@navya9singh 已经在做这个了。
开始于 2025年7月28日。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
Does this issue occur when all extensions are disabled?: Yes
Version: 1.103.0-insider (Universal)
Commit: d8361fecca3b53536de8f7a949b107fb7451e5e6
Date: 2025-07-25T05:03:31.984Z
Electron: 37.2.3
ElectronBuildId: 11993778
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Darwin arm64 24.5.0
(Happens both in insider and in latest stable version)
### About the issue
- When you copy code that relay on symbols that already exits in the target file - you will have duplicate imports.
- When you copy code to a comment it will also copy the imports.
### Steps to Reproduce
Copy code that relay on import to another file that already has this import.
https://github.com/user-attachments/assets/8a2df326-a40f-41fb-93dc-cecedea283f7
Check out this repo for easy reproduce:
https://github.com/ido-pluto/vscode-copy-with-import-issue/tree/main
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。