Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i write jsx when i write settimeout it will auto import timers #40001

Closed
zhiqiang21 opened this issue Dec 11, 2017 · 2 comments
Closed

i write jsx when i write settimeout it will auto import timers #40001

zhiqiang21 opened this issue Dec 11, 2017 · 2 comments
Assignees
Labels
javascript JavaScript support issues *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@zhiqiang21
Copy link

  • VSCode Version:1.18
  • OS Version:macos 1.13.2

Steps to Reproduce:

1.i write jsx when i write settimeout function ,

componentWillReceiveProps(nextProps) {


        setTimeout()
    }

2.then vscode will auto import times .it's not my wanted

import {setTimeout} from 'timers';

Reproduces without extensions: Yes/No

@vscodebot vscodebot bot added the javascript JavaScript support issues label Dec 11, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 11, 2017

Yes, our auto imports sometimes pick up unexpected symbols. Look in the suggestion list to see if the suggestion is an auto-import or not (top right side):

screen shot 2017-12-11 at 10 10 29 am

And you can disable auto imports entirely by setting: "typescript.autoImportSuggestions.enabled": false

@mjbvz mjbvz closed this as completed Dec 11, 2017
@mjbvz mjbvz added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Dec 11, 2017
@MrNovado
Copy link

@mjbvz This should be off by default, this wasted almost 3 hours of my life, coz I couldn't figure out why my timeouts suddenly stopped invoking callbacks

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants