- 0133技术站
- 联系QQ:18840023
- QQ交流群

- 微信公众号

这个对象使用另一个对象的某些东西
@borrows <that namepath> as <this namepath>
@borrows标签允许您将另一个标识符的描述添加到你的当前描述。
如果你不止在一个地方引用同一个函数,但是你又不想重复添加同样的文档描述到多个地方,这个时候非常有用。
在这个例子中,"trstr"函数存在文档,但"util.trim"只是使用不同的名称引用相同的功能。
例如,复制trstr的文档描述给util.trim
/** * @namespace * @borrows trstr as trim */var util = { trim: trstr };/** * Remove whitespace from around a string. * @param {string} str */ function trstr(str) { }
推荐手册