-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
docCommentTemplate does not return newlines in empty template anymore #20089
Comments
This was done intentionally in #19544. |
Not with our current flow. We show document templates in our suggestion list currently. When you hit enter, we accept the suggestion and eat the enter key press |
@mjbvz part of the change is allowing this to happen in multiple places as well; where in the past we only allowed it for certain declarations only. |
We can add a workaround for this if needed. Instead of generating an empty comment though, could |
that is what it used to do, now it always returns an empty comment, unless the locaiton is an invalid comment location (e.g. string, JSX text, or another comment). |
@mjbvz Just to clarify (regarding the new PR I just put up), the issue is not that we changed our default template from multiline to single line, but that we were too lax about where we considered a valid code location to insert a template? |
If it matters, I've created an issue for allowing users to set options in services at #20619 -- that could include settings for comment templates such as whether to make them multiline. |
TypeScript Version: 2.7.0-dev.20171116
Code
Trigger
docCommentTemplate
for foo.Expected behavior:
Returns:
Actual behavior:
Returns:
/** */
The text was updated successfully, but these errors were encountered: