/**
* Function deconstructs argument and do stuff.
* @param {} *** what should i do here? ***
*/
function someFunction({ key1, key2, key3 }) {
// do function stuffs
}
/**
* 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 }) {
// ...
};
1条答案
按热度按时间o4hqfura1#
从@param Wiki页面:
如果参数在没有显式名称的情况下被破坏结构,则可以为对象指定一个适当的名称并记录其属性。
记录结构化参数