https://wjkang.github.io/typescript-to-markdown/
typescript 类型转为 markdown table,可提取 jsdoc 注释,支持深层嵌套,支持自定义模板。
例子:
复制一段 typescript 类型声明,如下:
interface User { /** * @description 用户 id * @type {number} */ id: number; /** * @description 昵称 * @type {string} */ nickname: string; // 真实姓名 trueName: string; // 年龄 age: string; }
类型声明转为 markdown table 的格式,如下:
参数 | 说明 | 类型 | 必须 |
---|---|---|---|
id | 用户 id | number | 是 |
nickname | 昵称 | string | 是 |
trueName | 真实姓名 | string | 是 |
age | 年龄 | string | 是 |
使用场景:在基于 typescript 开发库的时候,更加方便的生成文档
1 duTop 2021-09-10 11:15:04 +08:00 赞,有用 |
![]() | 2 461229187 2021-09-14 10:01:22 +08:00 推出 vscode 插件必装 |