从
@param wiki page
:
如果参数在没有显式名称的情况下被分解,则可以为对象指定适当的名称并记录其属性。
/**
* Assign the project to an employee.
* @param {Object} employee - The employee who is responsible for the project.
* @param {string} employee.name - The name of the employee.
* @param {string} employee.department - The employee's department.
*/
Project.prototype.assign = function({ name, department }) {
// ...
};