react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

Expose more TypeScript types

Open matyasf opened this issue 2 years ago • 1 comments

We are using react-docgen to parse TypeScript component files and display their props and types in a documentation app. Our issue is that typing our parser code is not possible since these types are not exported. Would it be possible to expose more types? Heres our code: https://github.com/instructure/instructure-ui/blob/56c7c38e3f360b7110a720a7268b770c916e1500/packages/docs/buildScripts/DataTypes.mts#L89C1-L89C1 We'd like that these types are exported at least:

interface MethodParameter 
interface MethodReturn 
interface PropDescriptor 
interface PropTypeDescriptor
type TypeDescriptor
interface SimpleType
interface LiteralType
interface ElementsType
interface FunctionArgumentType
interface FunctionSignatureType
interface TSFunctionSignatureType
interface ObjectSignatureType
interface BaseType

So basically the types used by the Documentation type. Thanks!

matyasf avatar Oct 20 '23 09:10 matyasf