Create two folders with the name ‘src’ and ‘public’. ‘src’ will be responsible to keep ts files & ‘public’ will be responsible to keep js & html files.
Execute the following commands:
tsc --init
This command will be responsible to create a tsconfig.json file. Open the tsconfig.json file & make some changes:
"target": "ES2015",
"outDir": "./public",
"rootDir": "./src",
"strict": true,
"include":["src"]
Now use either 'tsc' or 'tsc -w'