microsoft / microsoft/TypeScript
VSCode version 1.58.2 Not able to add new imports in Typescript rush monorepos
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.58.2
- OS Version: macOS Big Sur 11.4
- Extension ids: [coenraads.bracket-pair-colorizer, wmaurer.change-case, streetsidesoftware.code-spell-checker, dbaeumer.vscode-eslint, file-icons.file-icons, eamodio.gitlens, esbenp.prettier-vscode, netcorext.uuid-generator, vscodevim.vim]
Steps to Reproduce:
- Create an interface Foo in a new location
- Create a class that depends on the Foo interface and try to auto import the definition through the VSCode auto import feature (highlight the interface and use
command + .to open the suggested actions) - The only option it will give the user if nothing has been imported from this location before is to extract to a type alias
- If something had been imported from the same location however, it can add the import to the existing list of imports
What should happen:
VSCode should suggest creating a new import statement for that interface at the top of the class file
What actually happens:
using command + . yields only the option to Extract to type alias.
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.
Rechercherichtung
Reproduziere das Problem in VS Code 1.58.2 mit einem TypeScript Rush monorepo, bei dem die Erweiterungen deaktiviert sind, und vergleiche einen neuen Importort mit einem bereits importierten. Verfolge das Verhalten von TypeScript auto-import und suggested-actions; als erledigt gilt die Aufgabe, wenn Command+. ein Import-Statement für das Interface anbietet und gleichzeitig bestehende Importvorschläge beibehält.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vscode
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100