-
Notifications
You must be signed in to change notification settings - Fork 34.3k
fix(193523): JSDoc optional parameters don't display in functions #202963
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
Conversation
Also I am ready to assist with any unit test to cover this case. |
I am unfamiliar with this whole review process. Is the bottom line that the fix will be included in a VS Code update in the future? Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still want to hide optional parameters at the end of the list. Otherwise some library functions will generation an overwhelming number of parameters that you don't care about
#193523 is specifically about when the optional parameter appears between two non-optional params. Let's focus on that case
Also make sure to add tests. These are defined in functionCallSnippet.test.ts
@microsoft-github-policy-service agree |
I've added the requested changes @mjbvz. Ready to assist if needed. |
Hello Matt. Just fixed the integration tests. Can you please review once available? @mjbvz |
extensions/typescript-language-features/src/languageFeatures/util/snippetForFunctionCall.ts
Outdated
Show resolved
Hide resolved
…til/snippetForFunctionCall.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Pleasure! |
Hello. This PR is a fix to #193523, which was labelled with both
help-wanted
andbug
labels.Useful summary of the issue:
Now, when you try to invoke the function
test
, you should notice that in the autocompletion preview the optional params have been omitted:After applying the fix (based on @RyanCavanaugh advice), the problem is solved.