JavaScript Comment Snippet Extension - Documentation Reference code example

Example: JavaScript Comment Snippet Extension - Documentation Reference

// `///` => will generate a complete comment block fragment
 
// Use the following categories to add specific annotation content:
 
// Note: the below is also an example of the generated commented block
 
/*
* @access
* @deprecated
* @desc
* @example
* @experimental
* @ignore
* @link
* @see
* @note
* @since    → @since MAJOR.MINOR.PATCH
* @todo
* @version  → @version MAJOR.MINOR.PATCH
* @license
*/
 
// Type Syntax:
 
/*
* "PREFIX"             "BODY"
* @param               @param {TYPE} param - description
* @param.property      @param {?TYPE} param.name - description
* @param.boolean       @param {boolean} param - description
* @param.Object        @param {Object} param - description
* @param.string        @param {string} param - description
* @param.number        @param {number} param - description
* @param.boolean       @param {boolean} param - description
* @param.Function      @param {Function} param - description
* @param.DOMElement    @param {DOMElement} param - description
* @param.Node          @param {Node} param - description
* @param.NodeList      @param {NodeList} param - description
* @param.RegExp	       @param {RegExp} param - description
* @type                @type {TYPE} - description
* @type.property       @property {TYPE} name - description
* @typedef             @typedef {TYPE} name - description
* @typedef.property    @property {TYPE} name - description
*/
 
// Function:
 
/*
* @return (single)
* @return
* @return property
* @requires
* @abstract
* @emits
* @listens
* @override
* @throws
*/
 
// Class:
 
/*
* @class
* @class.extends, @extends
* @class.interface, @interface
* @class.implements, @implements
* @class.constructor, @constructor
* @namespace
*/
 
// Misc:
 
/*
* @external
* @module
*/
 
// @param Syntax
 
/*
* "TYPE"               "BODY"
* Simple               @param {string} param - description
* Array	               @param {string[]} param - description
* Nullable             @param {?Object} param - description
* Not Nullable         @param {!Object} param - description
* Union	               @param {number|string} param - description
* Nullable and Union   @param {?(number|string)} param - description
* Spread               @param {...number} param - description
* Optional             @param {number} [param] - description
* Default              @param {number} [param=10] - description
* Function             @param {function(foo: number, bar: string): boolean} param - description
* Generics             @param {Map} param - description
* Record               @param {{foo: ?number, bar: string}} param - description
*/
 
// Resources:
 
[jsdoc - Github](https://github.com/jsdoc/jsdoc)
[esdoc - Github](https://github.com/esdoc/esdoc)
[JavaScript Comment Snippet - Extension Details (VS Marketplace)](https://marketplace.visualstudio.com/items?itemName=NicholasHsiang.vscode-javascript-comment)

Tags:

Misc Example