javascript2typescript
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -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']); |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37913
4
32
586
28
10
3
1
Updatedprettier-hook@^0.4.3