When working with a single TypeScript file, we repeatedly compile the file using
tsc command. We can use watch mode to automatically compile the file on change.
Here is how you can use watch mode:
tsc app.ts --watch
You can also use shorter flag:
tsc app.ts -w