Skip to content

jsdoc generated html missing for overloaded methods #723

Closed
@zamnuts

Description

@zamnuts

Environment details

  • OS: all
  • Node.js version: all
  • npm version:
  • @google-cloud/logging version: 7.2.2
  • jsdoc version: 3.6.3

Steps to reproduce

  1. npm run docs
  2. view docs/index.html in browser
  3. notice many methods are missing from Log and other classes

Example code snippet:

nodejs-logging/src/log.ts

Lines 737 to 819 in 56a8ed8

/**
* Write log entries to Stackdriver Logging.
*
* @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write}
*
* @param {Entry|Entry[]} entry A log entry, or array of entries, to write.
* @param {?WriteOptions} [options] Write options
* @param {LogWriteCallback} [callback] Callback function.
* @returns {Promise<LogWriteResponse>}
*
* @example
* const entry = log.entry('gce_instance', {
* instance: 'my_instance'
* });
*
* log.write(entry, (err, apiResponse) => {
* if (!err) {
* // The log entry was written.
* }
* });
*
* //-
* // You may also pass multiple log entries to write.
* //-
* const secondEntry = log.entry('compute.googleapis.com', {
* user: 'my_username'
* });
*
* log.write([
* entry,
* secondEntry
* ], (err, apiResponse) => {
* if (!err) {
* // The log entries were written.
* }
* });
*
* //-
* // To save some steps, you can also pass in plain values as your entries.
* // Note, however, that you must provide a configuration object to specify
* // the resource.
* //-
* const entries = [
* {
* user: 'my_username'
* },
* {
* home: process.env.HOME
* }
* ];
*
* const options = {
* resource: 'compute.googleapis.com'
* };
*
* log.write(entries, options, (err, apiResponse) => {});
*
* //-
* // If the callback is omitted, we'll return a Promise.
* //-
* log.write(entries).then(data => {
* const apiResponse = data[0];
* });
*
* @example <caption>include:samples/logs.js</caption>
* region_tag:logging_write_log_entry
* Another example:
*
* @example <caption>include:samples/logs.js</caption>
* region_tag:logging_write_log_entry_advanced
* Another example:
*/
write(entry: Entry | Entry[], options?: WriteOptions): Promise<ApiResponse>;
write(
entry: Entry | Entry[],
options: WriteOptions,
callback: ApiResponseCallback
): void;
write(entry: Entry | Entry[], callback: ApiResponseCallback): void;
async write(
entry: Entry | Entry[],
opts?: WriteOptions | ApiResponseCallback
): Promise<ApiResponse> {

See TypeScript issues:

A workaround is to move the jsdoc comment adjacent to the concrete method, and after the overload signatures.

Metadata

Metadata

Labels

api: loggingIssues related to the googleapis/nodejs-logging API.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions