Invalid verbatimModuleSyntax
quick fix offered when also reexporting a value
#57761
Labels
Bug
A bug in TypeScript
Domain: Refactorings
e.g. extract to constant or function, rename symbol
Help Wanted
You can do this
Milestone
π Search Terms
quick fix, verbatimModuleSyntax, value re-export
π Version & Regression Information
import type
Β #54255β― Playground Link
https://www.typescriptlang.org/play?verbatimModuleSyntax=true&ts=5.4.2#code/JYWwDg9gTgLgBAbzgQQEYGcZQIYGMYBqwApgO4A0cIxIEcAvnAGZQQhwBEUxeMHA3ACgA9MLgA9cXBik6ARwCuwXAGtmwAB7o4wAHa4ANgoAmegOZwA5KEixpATzDE4AOjeW4gGXJBg4htvwSDCOzmiYOPhEZJTUtAw+onC4bGDY3MbSdKjEBhCkAFw+NtCBcAAq2How2KgGxACqusCKxATYRsSUCujEALI0dAzMrOxcPPgCImKScBC6BvbqGjraegZ6zpbBTh6AoOQ+fgFJc5hw3X0DAExwALxnPf20Qr7+JQ5OiOWVutW1DU0tNodeJAA
π» Code
π Actual behavior
Quick fix is offering to convert the whole import to a
import type
.π Expected behavior
Only offer a quick fix of marking the individual named import with
type <name>
Additional information about the issue
This only appears to happen when the values being imported are only re-exported.
While a user is free to pick the more appropriate quick fix, it adds complexity when running the quickfixes on mass on large code bases where making individual judgment calls for each fix could take too long.
The text was updated successfully, but these errors were encountered: