npm install --save-dev typescript tsc-watch nodemon
@types/forest-express-mongoose. To get them, simply run:
npm install --save-dev @types/forest-express-[sequelize | mongoose]
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 that interest you. 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.
start-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.
usermodel, generated by Lumber:
modelsto store interfaces, and create the