Skip to content

Instantly share code, notes, and snippets.

@maxwellb
Last active April 24, 2020 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxwellb/a8bed49a6f2c36e987ac368f60be18a6 to your computer and use it in GitHub Desktop.
Save maxwellb/a8bed49a6f2c36e987ac368f60be18a6 to your computer and use it in GitHub Desktop.
JSDoc snippets
/**
* Accumulator type
* @typedef {*} TAccumulator
*/
/**
* Array type
* @typedef {*} TArray
*/
/**
* Array reducer
* @callback reducer
* @param {TAccumulator} accumulator
* @param {TArray} currentValue
* @param {number} [index]
* @param {Array.<TArray>} [array]
* @returns {TAccumulator}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment