VSCode has an option to change/rename variables called editor.action.rename
, usually bound to F2.
However, in Typescript and Javascript, this uses aliases when renaming an imported variable, eg:
import { originalName } from 'my-package'
results in
import { originalName as newName } from 'my-package'
How to prevent this, and propagate the change to all references?
It is possible to prevent renaming using aliases:
Preferences: Open Settings (JSON)
"javascript.preferences.useAliasesForRenames": false,
"typescript.preferences.useAliasesForRenames": false,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With