Skip to content

The vscode plugin converts js/json/swagger/api to typescript declaration

License

Notifications You must be signed in to change notification settings

AKclown/js-to-ts

Repository files navigation

JS To TS中文版 Optimizing

Easier and more convenient conversion of ts type declarations🤡

js-to-ts.jpg

Feature

convert objects of JavaScript to typescript type declaration.
PS: Pressing ctrl+shift+j when nothing is selected will convert the clipboard content

a plug-in that converts the type provided by the Swagger document to the typescript type automatically.
PS: To generate and download a Swagger JSON file, navigate to http://localhost:3000/api-json (assuming that your Swagger documentation is available under http://localhost:3000/api).

Convert API return data to typescript type declaration.
Link request to support the curl format
chrome -> network -> copy -> Copy as cURL(bash)
PS: Automatically assign the type content to the clipboard
apiToTs.jpg

Settings plane

Some custom configuration items config.jpg

Keyboard shortcuts configuration.

  • Default button configuration (window & mac)
  1. Object conversion operation ctrl+shift+j (Function 2)
  2. Swagger conversion operation ctrl+shift+k (Function 3)
  3. Add Block Comments ctrl+' (Function 4 => /** */)
  • You can also make customize settings in the shortcut key setting interface.

PS: If you think this plug-in is helpful to you, don't be stingy with the'⭐' in your hand to start the project, your encouragement is biggest support to the author. If you finds bugs or interactive improvements,you can go to the project to raise issue.

About

The vscode plugin converts js/json/swagger/api to typescript declaration

Resources

License

Stars

Watchers

Forks

Packages

No packages published