strothj / react-docgen-typescript-loader

Webpack loader to generate docgen information from Typescript React components.
Other
360 stars 47 forks source link

Make the name of the "type" property of the generated docgen structure configurable. #69

Closed patricklafrance closed 4 years ago

patricklafrance commented 4 years ago

As stated in the title, this PR add an option to configure the name of the "type" property of the generated docgen.

The idea is to be able to generate the same docgen structure that is generated by react-docgen for a TS component.

My goal is to have a way to identify which type system the docgen info have been generated from and apply a specific series of transformation based on that type system.

"type" -> PropTypes "tsType-> TypeScript "flowType" -> Flow

Thank you,

Patrick

strothj commented 4 years ago

Hello,

Thanks for the pull request. I've published this as 3.4.0.

patricklafrance commented 4 years ago

@strothj thank you!! :)

shilman commented 4 years ago

@patricklafrance @strothj you guys are both awesome 💯