node-samples icon indicating copy to clipboard operation
node-samples copied to clipboard

@param comments

Open ryanmdoyle opened this issue 6 years ago • 2 comments

Expected Behavior

In Node quickstart, there isn't a comment for what the @param {Object} credentials and other @param is doing. As someone who isn't familiar with what that is (it isn't vanilla node) it took me a while to find that it looks like it's from JSDoc. I don't have experience with a language like C which seems to have similar syntax so I had no idea what that was doing initially. (If anything)

Actual Behavior

It would be great to have an added comment line clarifying these lines of code for those trying to understand the codebase. Something like:

/**
 * Create an OAuth2 client with the given credentials, and then execute the
 * given callback function.
 * @param is a JSDoc tag that provides information about a callback function
 * @param {Object} credentials The authorization client credentials.
 * @param {function} callback The callback to call with the authorized client.
 */

Specifications

  • Node version 10.15.1
  • OS Mac

ryanmdoyle avatar Jun 28 '19 16:06 ryanmdoyle

@sqrrrl I'm new to the contributions in gsuitedevs, but I'd love to help tackle this with a PR if I'm able?

ryanmdoyle avatar Jul 04 '19 18:07 ryanmdoyle

@ryanmdoyle, want to suggest a change?

The object is in the form of the credentials you download from the quickstart site. Maybe we could clarify that.

grant avatar Jul 05 '19 05:07 grant