Socket
Socket
Sign inDemoInstall

javascript2typescript

Package Overview
Dependencies
29
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    javascript2typescript

The library is a helper to convert JavaScript to TypeScript.


Version published
Weekly downloads
1
Maintainers
1
Install size
11.5 MB
Created
Weekly downloads
 

Readme

Source

javascript2typescript

The library is a helper to convert JavaScript to TypeScript.

Features

  • define class/instance properties
  • convert require/exports to import/export
  • migrate jsdoc into type definition

How to run

$ npx javascript2typescript <dirname or filename>

// or

$ npm install -D javascript2typescript
$ npx j2t <dirname or filename>

//or 

$ yarn add -D javascript2typescript
$ yarn j2t <dirname or filename>

Options

commanddescription
--writecreate TypeScript files
--rmremove JavaScript files
-dconvert export = xxx to export default xxx

FAQs

Last updated on 04 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc