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

auto-suggest the name of argument based off the name of the parameter #25371

Closed
zpdDG4gta8XKpMCd opened this issue Jul 2, 2018 · 4 comments
Closed
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: Completion Lists The issue relates to showing completion lists in an editor Suggestion An idea for TypeScript

Comments

@zpdDG4gta8XKpMCd
Copy link

zpdDG4gta8XKpMCd commented Jul 2, 2018

Search Terms

https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue+suggest+name+argument+parameter+

Suggestion

far not always when calling a function you have all arguments ready, sometimes during quick and dirty bootstrap i just need to provide a list of whatever arguments that a function needs, and then work towards making sense of these arguments, for such cases it would be helpful if typescript auto-suggest the names of yet to be defined arguments based off the names of the parameters

Examples

declare function foo(one: number, another: string): boolean;
foo(
 // ^ carret is here, `one` is expected as an auto-suggestion 
@DanielRosenwasser DanielRosenwasser added Suggestion An idea for TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor labels Jul 2, 2018
@DanielRosenwasser
Copy link
Member

We'd recently talked about scaffolding out all the arguments as soon as someone completes on foo itself, or as soon as you enter a ( key. Any thoughts here?

@mhegazy mhegazy added the Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature label Jul 2, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jul 2, 2018

See #25207

@zpdDG4gta8XKpMCd
Copy link
Author

zpdDG4gta8XKpMCd commented Jul 2, 2018

just like you do with the props names of an object: Ctrl + Space brings up the names, pretty much the same way i wish i could get the existing list but with the name of the parameter on the top.

@RyanCavanaugh
Copy link
Member

Doesn't seem to be a common suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: Completion Lists The issue relates to showing completion lists in an editor Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants