018_jsdoc详解
一、常用jsdoc命令
1 2 3 | jsdoc test.js -c conf.json -d arun #Reference: https: //jsdoc.app/about-commandline.html jsdoc test.js -c conf.json -d arun --readme 01_2020522day25.md #添加readme到首页 Reference: https: //jsdoc.app/about-including-readme.html |
二、经典案例
(1)可选参数(即可写可不写)
格式: Reference: https://jsdoc.app/tags-type.html
@param {number} [foo]
// or:
@param {number=} foo
1 2 3 4 5 6 7 8 | /** * * @param {string} [name] - the name * @param {number=} age - the age */ function fn(name, age){ console.log(name,age); } |
【推荐】FlashTable:表单开发界的极速跑车,让你的开发效率一路狂飙
【推荐】Flutter适配HarmonyOS 5知识地图,实战解析+高频避坑指南
【推荐】博客园的心动:当一群程序员决定开源共建一个真诚相亲平台
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步