Skip to content

Instantly share code, notes, and snippets.

@idettman
Created December 9, 2019 08:15
Show Gist options
  • Select an option

  • Save idettman/8febc66d9b3991c0e915ea1a8e068873 to your computer and use it in GitHub Desktop.

Select an option

Save idettman/8febc66d9b3991c0e915ea1a8e068873 to your computer and use it in GitHub Desktop.
JSDoc exports example
'use strict';
/**
* Creates an instance of the StatusCodeErrorItem
* @memberof common
* @constructor
* @classdesc A class for holding information about an error. The params object allows the tracking of the function
* parameters that caused the error, but should not be used to store large objects.
* @description Creates an instance of the StatusCodeErrorItem with the given message and optional params object
* @param {string} message The message for this error
* @param {object} [params] The parameters that caused this error to occur
* @returns {StatusCodeErrorItem}
* @see {@link module:lib/common/StatusCodeError.StatusCodeError|StatusCodeError}
*/
function StatusCodeErrorItem(message, params) {
this.message = message;
this.params = params;
}
/**
* Surfaces a class that holds information about an error
* @module lib/common/StatusCodeErrorItem
*/
module.exports = StatusCodeErrorItem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment