Closed realh closed 6 months ago
Seems to work fine on the Windows verson of VSCode with TypeScript@4.2.3.
Can confirm. Alsoβand this may be unique to my setupβthe end quotation is removed from the specifier whenever this issue occurs.
Can't seem to reproduce this anymore, even using TS 3.9.7 with a newer vscode (1.74.2). π
Bug Report
π Search Terms
importModuleSpecifierEnding Import Module Specifier Ending
π Version & Regression Information
I've confirmed this in TS 3.9.7 (installed by npm) and 4.4.2 (Arch Linux package).
β― Playground Link
Sorry, I don't know how I could reproduce this outside of VS Code.
π» Code
π Actual behavior
I have "typescript.preferences.importModuleSpecifierEnding": "js" in my settings. I renamed a project folder in VS Code (using F2 in the Linux version), then clicked Yes to refactor all the other TS code that imported from that folder, using ".js" extensions. The folder was renamed successfully for each import, but they were all given a second ".js" extension, ie they were renamed to "*.js.js".
π Expected behavior
The additional ".js" shouldn't have been added where one was already present.