Skip to content

typescript.autoImportSuggestions should be off by default #57822

@csicky

Description

@csicky

Please consider having

typescript.autoImportSuggestions.enabled

off by default.

Reported in other places already, this is so annoying and wastes so much time to find.
If anybody wants it, should enable it. For the rest of us it's a very annoying and time wasting surprise.

#40001
#38911

If it's auto imported, why throws error?
"TypeError: timeout.close is not a function"

A JavaScript developer writes clearTimeout and doesn't think twice about it. timeout.close is not an expected error. If it's imported by default it should also work just like the original it shadows. But still, auto-import is dangerous. In this case it overwrites existing language feature. VS Code is not in position to change JavaScript. In a TypeScript project, maybe, but the user should know that an auto-import happened. Also the setting name starts with typescript, so default true in a TypeScript project.

Steps to Reproduce:
Use a clearTimeout in a Vue.js project.

Does this issue occur when all extensions are disabled?: Yes

  • VSCode Version: 1.26.1
  • OS Version: Windows 10

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extensioninfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions