Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Created October 16, 2019 15:12
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 marcelmokos/4b4f9c899da7a81bda74b9fa32192ffa to your computer and use it in GitHub Desktop.
Save marcelmokos/4b4f9c899da7a81bda74b9fa32192ffa to your computer and use it in GitHub Desktop.
jsdoc example
/**
* A person object with name, age and sayName method.
* @typedef {Object} Person
* @property {string} name The person's name.
* @property {number} age The person's age.
* @property {Function} sayName A function that alerts the person's name.
*/
const person = {
name: 'Joe',
age: 32,
sayName() {
alert(this.name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment