Enable generating documentation of advanced `propTypes` syntax
Added by @adamkudrna: This includes these useful ways of abstraction:
propTypesassigned as value of a constant in the same filepropTypesdefined in another file
Based on issue: https://github.com/doczjs/docz/issues/1431
We need to create documentation component that will allow us to render documentation table with all props and its description. This component should be similar to default docz PropType component, but need to be able to renders props that are composed from another proptype definitions.
I would recommend to move this component to separate repository later, because it seems that there are more people with same problem like we have.
@adamkudrna @mbohal I spent more that one hour reading and trying to somehow read and parse JS comment blocks, but without success. There are few discussions on StackOverflow telling that there is probably no way how to do it in the browser because comments are not available in the DOM.
The only way is to do it is to read it and parse it in Node environment, create metadata and render it from it. But it is extremelly hard and this is what docz do all together with other tools.
I think that the only option is to push docz team to fix it or try to create pull request that fixes it.
To sum up, there is no easy way out except writing it manually ...
I think that this should be closed as this is no more valid and we are getting rid of TypeScript and prop types in #394
What do you think @mbohal @adamkudrna?