Ccodemod-com-bot

react-19-prop-types-typescript

Convert React PropTypes declarations into TypeScript props interfaces

ReactPropTypesTypeScript
Private
0 executions
Run locally
npx codemod react-19-prop-types-typescript
Documentation

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

Ready to contribute?

Build your own codemod and share it with the community.