Now to get started I want to make sure that I don't have to rerun this command here.
This TSC command we're at point at a file after every change I make because right now whenever I change
something here in my typescript file and a one hour reflect that in my output file and on this Web page
here we have to save to file run the compilation again and then reload this file or if we have our NPM
start process running which we should have that at least our browser will automatically reload if we
don't directly open the file but instead are on low closed three thousand.
But nonetheless even though with that reloading automatically we still have to manually rerun the compilation
command.
So to get rid of that we can enter watch mode.
That means we can tell typescript to watch file and whenever that file changes typescript will recompile.
So for that we can still run the same command but now we add dash dash watch at the end or just single
dash w if we do that then we are in watch mode on that file.
And now whenever we change anything in there and we save that so that the file on the disk technically
changes as well.
You see does automate automated you read compiles.
And of course this also means that if we would do anything which is not allowed.
Like for example reassigning to a constant and then a wrong type as well.
Whenever we tried to do that of course it all recompensed.
But then just as if we manually run the command we see the compilation error down there.
So watch mode is already a big improvement.
The downside is that we still have to specifically target this file here and at the moment of course
this is the only file we're working with.
But typically in bigger projects that's not necessarily the case.