一个 typescript 转 markdown table 的工具 - V2EX-最新主题

一个 typescript 转 markdown table 的工具 - V2EX-最新主题

V2EX-最新主题
ruoxie:

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 的格式,如下:

User

参数说明类型必须id用户 idnumber是nickname昵称string是trueName真实姓名string是age年龄string

使用场景:在基于 typescript 开发库的时候,更加方便的生成文档


本文章由 轻惋频道 抓取自RSS,版权归源站点所有。

查看原文:一个 typescript 转 markdown table 的工具 - V2EX-最新主题

Report Page