Hi,
Thank you so much for Docz, I always had issues with other tools, and Docz just work. The Typescript integration with PropsTable
is awesome and I'd just like to open discussion on some more advanced integration:
function MyComponent({text = "hello"}) {}
Voilà, I'm sure you already though of these items but I though it would be good to have an open discussion on it.
Glad you liked it @mquandalle. I'm using typescript a lot in a bunch of projects nowadays, to be honest, I'm using it for all projects and I really like it. Unfortunately, since I did not have much time, I ended up choosing to get some tool that makes this annotation integration already. In this version of docz we're using react-docgen to generate the properties table, but it is kinda limited, have a lot of trade-offs and can be a performance problem 😢One of these trade-offs is about default properties using typescript. Flow integration is so much better than typescript!
Maybe in future is good thing create something or improve react-docgen to fix these problems.
About annotations in normal functions, this is awesome and I think that is something really easy and viable to do with docz. I'm thinking about that this week and JSDocs until now is the better alternative!
I really don't know much about meta analyse of JS files, but do you think it might be viable to use the typescript language server (for both TS and JS files) to gather meta informations like types and field descriptions using the same API than IDE like VS Code?
The idea would be to use a mature high level API instead of transforming AST.
Most helpful comment
Glad you liked it @mquandalle. I'm using typescript a lot in a bunch of projects nowadays, to be honest, I'm using it for all projects and I really like it. Unfortunately, since I did not have much time, I ended up choosing to get some tool that makes this annotation integration already. In this version of docz we're using react-docgen to generate the properties table, but it is kinda limited, have a lot of trade-offs and can be a performance problem 😢One of these trade-offs is about default properties using typescript. Flow integration is so much better than typescript!
Maybe in future is good thing create something or improve react-docgen to fix these problems.
About annotations in normal functions, this is awesome and I think that is something really easy and viable to do with docz. I'm thinking about that this week and JSDocs until now is the better alternative!