Investigate propTypes generation
At the moment we manually generate both the *Props TypeScript type and the .propTypes values. They are kept somewhat in sync by the TypeScript interface for FC<>.propTypes.
We could auto-generate the *.propTypes from the *Props type to save us some hassle...
The following look like they might be promising:
- https://www.npmjs.com/package/babel-plugin-typescript-to-proptypes
- https://www.npmjs.com/package/typescript-to-proptypes
- https://www.npmjs.com/package/typescript-proptypes-generator
- https://github.com/dpzxsm/ReactPropTypes-Plugin
- https://github.com/dpzxsm/react-proptypes-generate
Storybook appear to have a Typescript PropType parser that might help (and might be the best option for integrating with the docsite - See issue #32 (closed)):
Edited by Richard Peach