【发布时间】:2022-01-01 01:17:48
【问题描述】:
async function userInformation({ userId, token }) {
const body = {
user: userId
};
const headers = {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/x-www-form-urlencoded'
};
const url = 'https://example.com/api/users';
const data = await axios.post(url, headers, qs.stringify(body));
return data;
}
考虑这段代码 我应该如何为这个函数编写 jsdoc? 如何保证jsdoc中定义了参数类型?
【问题讨论】:
标签: javascript node.js documentation jsdoc