Skip to content

Instantly share code, notes, and snippets.

@marcelmokos
Created Oct 16, 2019
Embed
What would you like to do?
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