1.2.4 • Published 5 years ago
typewiz-node v1.2.4
typewiz-node
Automatically add types to node.js TypeScript code using typewiz-core
Installation
yarn global add typewiz-node
or
npm install -g typewiz-node
Usage
typewiz-node <main.ts>
If you want to enable typewiz for your mocha test, simply add -r typewiz-node/dist/register
to your mocha command-line, e.g.:
mocha -r typewiz-node/dist/register src/**/test.ts
This will run your unit tests, discover type information, and write it back to your source files.
Example
Given the following input file:
function greet(who) {
return `Hello, ${who}`;
}
console.log(greet('Uri'));
Typewiz will run the program and then the code will be updated as following:
function greet(who: string) {
return `Hello, ${who}`;
}
console.log(greet('Uri'));
Note the addition of the : string
type for the who
parameter in the first line.
License
MIT
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.1.0-1
6 years ago
1.1.0-0
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.0
6 years ago
1.0.0-beta.2
6 years ago
1.0.0-beta.1
6 years ago
1.0.0-beta.0
6 years ago
1.0.0-alpha.0
6 years ago
0.5.0
6 years ago
0.4.3
6 years ago
0.4.2
6 years ago
0.4.1
6 years ago
0.4.0
6 years ago
0.3.0
6 years ago
0.2.0
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago