Skip to content

VSCode extension to transform JS object into TS typed interface

License

Notifications You must be signed in to change notification settings

lwkchan/make-a-type

Repository files navigation

make-a-type

This extension is available on the VSCode Marketplace.

I made this because the other available extensions which convert JS to TS either required you to use a JSON object or they created a separate TS file. This extension does not require you to use JSON and captures the TS type in your clipboard so that you can paste it anywhere you want.

Features

  • Highlight a JS Object, and get a TypeScript interface in your clipboard

make-a-type demo

Requirements

  • VS Code 1.44 or higher

Usage

  1. Highlight your JS object
  2. Open command pallette (Ctrl/Cmd-Shift-P)
  3. Search for "Make JS Object into TS Type: clipboard"
  4. Select option
  5. TS type is now in your clipboard, now paste it wherever you want to

About

VSCode extension to transform JS object into TS typed interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •