-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Typescript: import autocomplete fills in function arguments #2092
Comments
@andy-hanson I assume you have set "typescript.useCodeSnippetsOnMethodSuggest": true. Right? |
Right. |
Quick note: this is not limited to imports, any assignment can be impacted: const a = {
func(x) {}
}
let {f|} = a; completes to let {func(x)} = a; |
Issue microsoft#2092 **bug** With typescript.useCodeSnippetsOnMethodSuggest enabled, we will automatically complete function calls inside some contexts where they should not be completed. For example, destructing assigment. **fix** Add a quickinfo check on the position before attempting to insert a function call. Create a blacklist of invalid contexts. Otherwise, assume that we want to complete the function call.
…ts (#16415) Issue #2092 **bug** With typescript.useCodeSnippetsOnMethodSuggest enabled, we will automatically complete function calls inside some contexts where they should not be completed. For example, destructing assigment. **fix** Add a quickinfo check on the position before attempting to insert a function call. Create a blacklist of invalid contexts. Otherwise, assume that we want to complete the function call.
I'm still getting this error. The autocomplete just fills in an argument's type, not a correct signature. |
@zakdances Are you on 1.9 insiders? This fix is not in VSCode 1.8. |
@mjbvz I'm using 1.8.1 so I guess you can disregard my message. Thanks for the heads up! |
When I use autocomplete to import a function, it fills in the function arguments right there.
Here's what it looks like:
import {foo} from './fooBar'
import {foo, b} from './fooBar'
bar
shows up as a suggesstion; hit enter.import {foo, bar(argname)} from './fooBar'
.The text was updated successfully, but these errors were encountered: