typescript.preferences.preferTypeOnlyAutoImports not working with TypeScript 5.3? #56832
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
🔎 Search Terms
preferTypeOnlyAutoImports
🕗 Version & Regression Information
I was very excited about:
But when I came to take it for a spin with
[email protected]
the original import behaviour (i.e. importing without atype
specifier) occurred.⏯ Playground Link
No response
💻 Code
Before auto imports kicked in:
🙁 Actual behavior
The
QueryOrView
type import above was added by the auto-imports behaviour of VS Code despite havingtypescript.preferences.preferTypeOnlyAutoImports: true
🙂 Expected behavior
I would expect the above as the the auto-imports behaviour of VS Code due to having
typescript.preferences.preferTypeOnlyAutoImports: true
Additional information about the issue
My
tsconfig.json
in case it is relevant:where
tsconfig.node.json
is(A basic Vite generated
tsconfig.json
)My
.eslintrc.cjs
(not sure this is actually relevant)I'm wondering if I'm making a silly mistake, or if I should be modifying the advice in my blog post in some way. Not sure.
https://johnnyreilly.com/typescript-5-importsnotusedasvalues-error-eslint-consistent-type-imports#make-vs-code-prefer-type-imports
The text was updated successfully, but these errors were encountered: