Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JSDoc doucumenting destructured object parameter

/**
 * My cool function.
 *
 * @param {Object} obj - An object.
 * @param {string} obj.prop1 - Property 1.
 * @param {string} obj.prop2 - Property 2.
 */
const fn = function ({prop1, prop2}) {
  // Do something with prop1 and prop2
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JSDoc #doucumenting #destructured #object #parameter
ADD COMMENT
Topic
Name
5+4 =