Describing an array of objects in JSDoc
JSDoc @param documentation
/**
* Assign the project to a list of employees.
* @param {Object[]} employees - The employees who are responsible for the project.
* @param {string} employees[].name - The name of an employee.
* @param {string} employees[].department - The employee's department.
*/
Project.prototype.assign = function(employees) {
// ...
};
/**
Using typedef
/**
* @typedef AwesomeObject
* @type {Object}
* @property {string} name
* @property {boolean} next
* @property {string} test
*/
/**
* @param {Array.<AwesomeObject>} awesomeObjects Awesome objects.
*/
myAwesomeFunction(awesomeObjects) { ... }