Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

bin/j2t.d.ts

1

lib/modules.js

@@ -12,2 +12,3 @@ "use strict";

// TODO: for now, it only supports top level imports, not support dynamic imports
// TODO: module.export => export = xxx
function resolveImport(node) {

@@ -14,0 +15,0 @@ const body = util_1.get(node, ['program', 'body']);

18

package.json
{
"name": "javascript2typescript",
"version": "0.0.1",
"version": "0.1.0",
"main": "index.js",

@@ -10,3 +10,3 @@ "repository": "git@github.com:suguru03/javascript2typescript.git",

"build": "tsp build",
"publish:npm": "tsp publish"
"test": "mocha test/**/*.ts"
},

@@ -20,15 +20,15 @@ "bin": {

"minimist": "^1.2.0",
"prettier-hook": "^0.4.0"
"prettier-hook": "^0.4.3"
},
"peerDependencies": {
"prettier": ">= 1.13.7"
},
"devDependencies": {
"@types/mocha": "^5.2.6",
"@types/node": "^10.12.21",
"husky": "^1.3.1",
"lint-staged": "^8.1.1",
"prettier": "^1.16.3",
"ts-node": "^8.0.2",
"mocha": "^6.0.2",
"prettier": "^1.16.4",
"ts-node": "^8.0.3",
"ts-publisher": "^0.1.0",
"typescript": "^3.3.1"
"typescript": "^3.3.1",
"vm-agent": "^0.5.8"
},

@@ -35,0 +35,0 @@ "husky": {

# javascript2typescript
⚠ WIP ⚠
The library helps to convert JavaScript to TypeScript.
Convert JavaScript files to TypeScript files
## Features
- define class/instance properties
- convert require/exports to import/export
- migrate jsdoc into type definition
## Install
Prettier is a peer dependency, please install both dependencies.
```sh

@@ -17,7 +23,6 @@ // npm

## Develop
## How to run
```js
$ yarn tsc -w
$ ./bin/j2t.js examples
$ yarn j2t <dirpath or filepath>
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc