atlassian / extract-react-types

One stop shop for documenting your react components.
https://atlassian.github.io/extract-react-types/
MIT License
179 stars 28 forks source link

Prop opt out #141

Open alexreardon opened 4 years ago

alexreardon commented 4 years ago

We are finding that our prop types are getting increasingly complex and sophisticated. At some point extract-react-types does not use the TypeScript compiler and it is not reasonable for it to understand the whole breadth of the language.

Can I suggest an opt out?

type Props = {
/* @readonly
….
*/
name: SomeSuperComplexType
}

Perhaps we could put some information in the jsdoc above a prop to tell extract-react-types to not bother trying to understand the type and just print it out as a raw string

alexreardon commented 4 years ago

Would this be possible @danieldelcore?