Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PropType ConverterNew to Visual Studio Code? Get it now.
PropType Converter

PropType Converter

robballou

|
36 installs
| (1) | Free
Rudimentary PropType to TypeScript converter for VSCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-pt-converter README

This VSCode extension allows for easy use of PropType Converter for converting PropTypes to TypeScript types.

Get the extension!

Features

  1. Provides a refactor option for JS/TS files to convert PropType implementations to TypeScript Types.
  2. Includes the ability to refactor defaultProps to a destructured parameter with default values.
  3. Also provides two general convert commands which will convert all the components in a file as well as specific code actions.

Usage

While editing a React component, you can either use the "Refactor..." command/menu item, the code actions shortcut, or the "Convert PropTypes..." commands.

The refactor/code actions options will only show up if PropTypes are detected. Additionally, they will rename the file to its appropriate TS file extension.

Known Issues

The PropType Converter library is purposefully limited in what it can convert. You can make recommendations for common PropTypes to support there. Also it will convert PropTypes it does not understand to unknown so you can type it correctly!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft