Use suggested method parameters in Visual Studio Code
Asked Answered
S

2

9

Visual Studio Code suggests the right parameters for well defined methods as you type them. Is there a way to take them over / insert them straight away? Doesn't feel right to write the parameters with their types by hand...

enter image description here

Sparker answered 3/4, 2016 at 22:19 Comment(1)
I also not found this possibility, but yeah this is good idea to autocomplete from d.ts files. I suggest to add this feature request to github.com/Microsoft/vscode/issuesClaudeclaudel
P
12

Something like that exists for javascript & typescript files:

settings.json Ctrl+,

"typescript.suggest.completeFunctionCalls": true,
"javascript.suggest.completeFunctionCalls": true,
Plumbo answered 7/12, 2017 at 6:28 Comment(3)
Thanks a lot, that was exactly what I was looking for!Sparker
I added this, it adds paranthesis, but does not autocomplete variablesWilone
This is great and unknown to a lot of people, I wish VSCode could suggest this in the intellisense when writing functions.Phantasm
S
-1

Now its finally working as expected, Visual Studio Code 1.63.0 implemented "Method Signature Completions": https://code.visualstudio.com/updates/v1_63#_method-signature-completions

Sparker answered 11/12, 2021 at 15:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.