JSDoc:参考包的类型

时间:2019-11-29 21:48:22

标签: javascript typescript momentjs jsdoc

给出一个返回其他包类型的函数,如何使用JSDoc对其进行文档记录?

const moment = require('moment')

/**
 * How do I use the types defined in ./node_modules/moment/moment.d.ts in this function's return type?
 * @returns {???}
 */
function getMoment () {
    return moment()
}

0 个答案:

没有答案