-
Notifications
You must be signed in to change notification settings - Fork 16
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
[Feat Request] support inline params name #1
Comments
Hey @axetroy! I'm glad you like the extension, and I'm surprised someone actually found it. :-) I can add the feature you want this evening, and I plan to make the different options configurable using the VS Code settings. And there are some gotchas and bugs which I also will tackle soon. |
Hey @axetroy, When testing this new feature I've noticed something and I'd like to hear your opinion on it, as you suggested the feature. When a variable is passed as the argument that matches the parameters name, should there still be a decoration rendered? For example: function someFunc(name: string, age: number, job: string): void { /* ... */ }
const name = 'Bob';
const occupation = 'Builder';
someFunc(name, 40, occupation); Should this result in a rendered decoration: I tend to prefer the omit option, as the repetition serves no purpose. |
I've opted for the omit version. If you desire the opposite, please just open a new feature request. :-) I've also released version 0.2.0 which contains this feature. |
@MartinJohns I would like to enable this feature as default. If you were used Webstorm, you should found this feature is supported by build-in. It's clear to known what params you call with this function. for example: before: function createPoint(x: number, y: number) {
return {
x,
y
};
}
const point = createPoint(0, 1); after: with this feature, I have clearly known that |
This extension is awesome and useful.
Can you consider to add a feature for
CallExpression
AST node?before:
after:
The text was updated successfully, but these errors were encountered: