react-19-prop-types-typescript
Codemod to convert React PropTypes into TypeScript props interfaces.
- Supports function and class components
- Supports static propTypes on class components
- Supports forwardRef and React.forwardRef
- Supports React.memo(...) wrappers
- Copies JSDoc comments onto generated TypeScript members
- Supports preserving PropTypes with preserve-prop-types=unconverted|all
Usage
bash
Before
jsx
After
tsx