Project Structure
it has simple structure where call to JS from html (mostly- index.html)
the js is generated after compilation of ts file by transpiler(comes with node)
command to compile:
tsc ./ts_filename.ts
and to keep watching for changes one can use -w as parameter
tsc -w ./ts_filename.ts
using above command we need to run the command as many times as there are ts file.
SO , how do we overcome this:
tsconfig.json configuration file used by tanspiler,
Sample structure:
{
"compilerOptions": {
"target": "ES5"
}
}
it takes the whole project as typescript as just need to run one command and it converts whole ts files in proj to corresponding js.
Command to use with tsconfig.json
tsc[Enter]