DEV Community

Discussion on: Setup Node/Express with TypeScript

Collapse
 
himharsh1997 profile image
Himanshu Joshi

First, you need to install typescript and tslint globally with -g option before installing them in devDependencies in your project.

Collapse
 
tombohub profile image
tombohub

why?

Collapse
 
himharsh1997 profile image
Himanshu Joshi

So that you can use typescript along all projects with same version and do tsc --watch to build js from it.
Actually for majority it is not a prefer way as different developer may be using different version of typescript. So you can also do npm i --save-dev typescript or install extension from code editor.