react-docgen
react-docgen copied to clipboard
Are there any TypeScript typings for this library?
I'm struggling with typing the output of this library, has someone already done so? The only thing I've found was in the Readme, but its very vague , e.g. "elements": [{ <element-type> }
-- what is here <element-type>
? Has someone already typed the output? Thanks!
I believe that much of the code has been converted to typescript in the main branch, but has not yet been released.
There is now version v6.0.0-alpha.1 which is the first pre-release with typescript typings included.
Thanks @danez - I'm trying out alpha.3, I'm noticing the return types for parse
are not quite correct - they seem to indicate DocumentationObject
, but in reality I get an object with:
[ { description: '', displayName: 'Counter', methods: [ [Object] ] } ]
I'm guessing this will be fixed in a future release - anything I can do to help out?
This has changed now in 6.0.0-alpha.4 parse()
now always returns Documentation[]
.