-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
clearTimeout is imported from timers #30713
Comments
I think this is a duplicate of #15024. |
I don't think it's a duplicate of #15024 because that issue says to favor local variables while this issue is about why existing global properties of the window object are being shadowed with something auto imported. This was and will be reported probably in the future because it doesn't seem like there is any interest in fixing this. |
I see both in my completion list, which is probably even worse (since it's hard to tell them apart). If something in the lexical scope exists, we shouldn't offer it at all as an auto-import |
this is how i do it:
it's back to the question about annoying ambients #14306 |
@csicky I'm trying to track down how and when the worst-case scenario is happening. Like Ryan, I see both completions, and the global one is always the top one and always selected, so for me,
|
For public visibility: I do have a PR up at #31065, but I don't like it very much. Given this:
I've changed the milestone to 3.6 and plan to revisit this and see if we can come up with some better heuristics after 3.5 is released. |
Woops, this should have been closed with #31893. The "fixed" label kept it from showing up in my usual query. |
Steps to Reproduce:
clearTimeout
import { clearTimeout } from 'timers'
imported without asking and error in the browser.Reported here already:
microsoft/vscode#57822
microsoft/vscode#40001
microsoft/vscode#38911
Is it impossible for VS Code to know that I write code for a browser where these are available already, and should not import them?
Does this issue occur when all extensions are disabled?: Yes/No - no idea
The text was updated successfully, but these errors were encountered: