microsoft / microsoft/TypeScript
Rename a symbol of a named export: Do not create export alias
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
- VSCode Version: 1.30
- OS Version: Win 10
When I rename a symbol which is a named export in a module, then there is just an alias created in the module export (VS Code 1.30). What I would expect is that the symbol is renamed in the module export AND all in all modules that are importing it (that is the bevavior of 1.29.1). Or an option by which I can specify the old behavior. This feature is soo useful to rename a bunch of modules.
Release notes of 1.30 only include some rename changes for destructuring , but I did not have any destructuring in code.
Old (1.29.1):

New (1.30):

Does this issue occur when all extensions are disabled?: Yes, running clean versions of 1.30, 1.29.1
PS: Typescript 3.2.2 in both tests.
// EDIT:
Actually, after all VS Code 1.29.1 did use Typescript 3.1.4 in the first test, not 3.2.2. Switching to TS 3.2.2 with the old 1.29.1 version, the same behavior (just aliasing the export instead of renaming in the whole workspace) reoccurs.
I am not sure, if there are interdependencies between VS Code and TS and therefore leave the issue open or not?
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.
Direzione di ricerca
Inizia riproducendo la ridenominazione di un named export in VS Code 1.30 con TypeScript 3.2.2, quindi confrontala con il comportamento segnalato di TypeScript 3.1.4 in VS Code 1.29.1. Il problema è risolto quando la ridenominazione di un simbolo esportato aggiorna l’export e i moduli che lo importano invece di creare un alias.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript, vscode
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100