Bad JSdoc placement on Topic.setMetadata #1372
Replies: 5 comments 1 reply
-
Thanks for the report! I'll add this to my list of docs/comments cleanup issues. |
Beta Was this translation helpful? Give feedback.
-
Actually, there are a bunch of them missing. There are a lot fewer that have JSDoc in the .d.ts that have them than the ones that don't. I wonder if something changed in the way the typings JSDoc is generated, because the generated HTML doc pages do actually have the comments. |
Beta Was this translation helpful? Give feedback.
-
This seems to be related: microsoft/TypeScript#25590 It seems TypeScript still doesn't want to support JavaScript style overloaded functions/methods. I'm going to flip this to a feature request, because I think it's going to take more effort to correct. :| |
Beta Was this translation helpful? Give feedback.
-
Hmm, the answer I'm getting seems to be: this isn't a great solution, but it's less bad than the other solutions we considered. TypeScript and JSDoc have a complicated relationship, apparently. It's intentional that we are just putting the comments into the generated .js files, but it does seem confusing to me that it's in the .d.ts for only some of the methods. |
Beta Was this translation helpful? Give feedback.
-
Moving this over here as a sort of wishlist item for now, since the overall answer I got from other folks working on GCP Node libraries was more or less "working as intended". I do think we'd like to improve it over time though. |
Beta Was this translation helpful? Give feedback.
-
Thanks for stopping by to let us know something could be better!
If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details
@google-cloud/pubsub
version: v2.5.0Steps to reproduce
@google-cloud/pubsub
Topicl.setMetadata
methodThere is JSdoc for this method in the source: https://github.com/googleapis/nodejs-pubsub/blob/master/src/topic.ts#L835
However, I believe it is placed incorrectly in relation to the overload declarations. Regardless, it is missing from the published
.d.ts
file:Beta Was this translation helpful? Give feedback.
All reactions