-
Notifications
You must be signed in to change notification settings - Fork 648
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
Write @deprecated jsdoc annotation if includeComments is enabled #2357
Write @deprecated jsdoc annotation if includeComments is enabled #2357
Conversation
update golden generated with @deprecated annotation
|
@@ -184,7 +189,7 @@ const typeBrandHint = `This field is a type brand and is not populated at runtim | |||
https://github.com/grpc/grpc-node/pull/2281`; | |||
|
|||
function formatTypeBrand(formatter: TextFormatter, messageType: Protobuf.Type) { | |||
formatComment(formatter, typeBrandHint); | |||
formatComment(formatter, typeBrandHint, messageType.options); |
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.
I don't think this one is right. This comment isn't on the message interface itself, but rather on a synthetic field in the interface. So it doesn't make sense for this field to inherit the message type's deprecated status.
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.
@murgatroid99 I removed the options argument for this format call.
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.
Thank you for your contribution.
This is out in version 0.7.5. |
By adding the JSDoc
@deprecated
annotation to the output comments to interface fields IDE's can pick it up and deliver a better developer experience. This annotation is only added when theincludeComments
option is enabled. Since protobuf.js already parses if a field is deprecated or not the options object with that information is passed to theformatComment
function.Update golden generated with @deprecated annotation.
Resolves #2348