Skip to content

Instantly share code, notes, and snippets.

@olvresc
Last active April 9, 2021 14:34
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 olvresc/769053926cbdf655ac5656d66ef91fc3 to your computer and use it in GitHub Desktop.
Save olvresc/769053926cbdf655ac5656d66ef91fc3 to your computer and use it in GitHub Desktop.
Extend parent and child typedef in JSDoc
/**
* Extend `typedef` example for array of objects
*
* ---
* @typedef {object} Parent
* @property {string|number} id
* @property {object[]} fields
* @property {string} fields[].code
* @property {*} fields[].value
*
* @typedef {Parent} Child
* @return {Child[]}
* /
function func() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment