Socket
Book a DemoInstallSign in
Socket

javascript2typescript

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

javascript2typescript

The library is a helper to convert JavaScript to TypeScript.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 04 Dec 2019

Did you know?

Socket

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