By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用 babel 解析 ts js 文件。然后分析 ast 中的注释。通过正则解析出需要的字段。
https://github.com/DiamondYuan/interface-comments-parser (目前只能解析 ts)

语法和 jsdoc 相同,唯一不同的是支持 i18n

一开始只是想给 antd 的接口都加上注释,为了不维护两套文档就在想通过注释生成文档的方法。
在不不知道 tsdoc 的情况下造了一套轮子。语法和 tsdoc类似,支持 i18n。
我先去研究游戏 tsdoc,然后再考虑如何和 umi 结合起来。

docz 的 PropsTable 是基于 https://github.com/styleguidist/react-docgen-typescript

我觉得他那个很多情况没有考虑到。比如文档显示的类型和实际代码类型的文字不同,接口参数版本。
#2147

我想在 tsdoc 的基础上加一些自定义注解和 i18n 支持。