-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Heuristic/loose completions for the 'any' type #5334
Comments
Yeah, it should be useful. Like other normal JavaScript IDE are doing (ie. WebStorm and similars...) |
We have something similar in JS file completions, i wounder if that is what we should enable if we run in an |
That's precisely what I mean. 😃 |
This happens now |
Not in a TypeScript file it doesn't. |
#5334 (comment) suspect this isn't TypeScript powered but vscode text-word-reuse (not actual name) powered |
Yup, VS Code will give word completions in a That said...VS Code's word completions are pretty good. I requested this back when Visual Studio was our primary editor. Maybe we should roll with the current behavior? |
Motivation
Today, if you have a value of type 'any', dotting off of the value and requesting members for completion will return nothing back. The original motivation for this was that we should never risk giving users incorrect completions.
This is great for a fully typed TypeScript project. However, for those migrating to TypeScript, as well as those who need to drop down to
any
fairly frequently, this can be slightly frustrating.For those used to the JS editing experience in editors like Sublime where they just "got completions", the current behavior might be seen as unattractive.
Proposal
We should consider adding a language service option for users to get "loose" completions akin to what we give in the Salsa language service.
We can still keep the warning for each completion, but we should provide completions with a builder.
The text was updated successfully, but these errors were encountered: