npm install --save-dev typescript tsc-watch
forest-express-mongoosepackages. That being said, no additional package needs to be installed.
allowJsoption) as an extension, and to transpile them into a
./distfolder. This is where your transpiled files will be. This type of configuration allows you to translate your app into TypeScript in dribs and drabs. No need to translate every file at once, change only the files you are interested in. Now that your TypeScript transpiler is set, we need to update our
package.jsonwith new scripts to fit with the new structure of our project.
devis the script to use while developing. It will transpile your sources every time you perform a change, and it will refresh your server. Finally, let's install the mandatory typings for a newly generated project, run this from a command prompt:
.ts, change some code, and your file will be automatically handled.