Open stropitek opened 7 years ago
Reminder: to build the documentation, cheminfo docs
, to build and push the documentation to github: cheminfo docs --publish
Here is an example of how to properly document a function that has an object passed as argument and default options
/**
* Creates a SD instance from the given jcamp.
* @param {string} jcamp - The jcamp string to parse from
* @param {object} options - Jcamp parsing options
* @param {boolean} [options.keepSpectra=true] - If set to false the spectra data points will not be stored in the instance
* @param {RegExp} [options.keepRecordsRegExp=/^.+$/] - A regular expression for metadata fields to extract from the jcamp
* @return {SD} Return the constructed SD instance
*/
Some functions in the API have an old format. And it has not been updated. About the verbosity of the private functions, it is automatically generated when your write /** and Enter to write the function signature and I don't find anything bad in it. But the idea of marking it as private seems good to me.
@jobo322 you should take care of this thread.
The documentation is very messy right now. Most of the stuff should not be publicly documented, only the public API should. The possibilities:
@private
so that it's "ignored" during the documentation buildIs a very verbose way to just describe the function signature, and has no added value if no more details are specified
Also you should review the warnings given by eslint about jsdoc:
npm run eslint
and try to fix them.