November 2019
Beginner
804 pages
20h 1m
English
Now that you're more familiar with npm, let's add TypeScript to our project. As discussed in the last section, we'll add it to the package.json file and then we will also add a script to invoke it easily.
First, add the devDependencies section and add TypeScript to those dependencies (since TypeScript is a tool and is only necessary at build time):
"devDependencies": { "typescript": "3.4.4"
},
Next, replace the scripts section with the following:
"scripts": {
"compile": "tsc"
},
With this script, ...
Read now
Unlock full access