Now if we move on we get more options no unused locals no unused parameters no implicit returns.
This helps you with code quality basically typescript will complain if you have certain unused variables
and so on.
So if we turn these free options on for example this option helps you with switch statements where you
might forget the brake cured but if we turn these free options on what types will complain about is
for example if you had a user named variable here locally in this function and you don't use it you
see this has yellow squiggly lines because it's not an error really it's more like a warning or a hint.
So if I compile here you see now however I do get an Arabic must have could only knows errors.
And there we see the user name is declared but its value is never read because we made sure that we
don't want unused local variables unused global variables so if I had something like app I.D. here are
allowed though because typescript can't know if you may be need that globally defined value in a numbers
script file so therefore this is allowed but in a function where there is no other place where you could
needed typescript will complain now if you have unused code and that's generally a good idea allows
you to strip out such unused code.
Same goes for unused parameters if you would take a h here for one of course bind is broken now.
But even if we pass this in this works.
But now again TypeScript and therefore also the idea tells us that this is unused and indeed it is.
So maybe you should remove it or start using it.
So that's no unused parameters and no implicit returns means that we'll get an error if we have a function
that sometimes returns something and sometimes it does not let's say we have another function at where
we get two numbers number and and 2 is a number and of course we can return and 1 plus and 2 but let's
say where for some reason checking if and 1 plus and 2 is greater than 0 because we only want to return
if we have a result greater than zero and then we want to return to value.
Otherwise we want to return nothing.
We don't want a return.
Well then we get a warning because of that extra setting with no implicit returns typescript detects
that not all branches in this function lead to a return statement and because of our setting that's
not allowed.
We at least have to deliberately not return anything here by adding the return keyword just omitting
it is not allowed here.
It is allowed if you have a function that does not return anything.
In no branch but if you have at least one case where your function does return something then you have
to make sure you return something in all cases.
And with that we're nearing the end of this contact walkthrough.
We can ignore the module resolution here.
All these options actually are pretty advanced that don't matter to us here don't matter to you in a
lot of projects.
Source map options allow you to tweak these source maps.
We had a look at earlier so these translation files from javascript to typescript typically default
settings should be fine here so if you don't know what you're changing and why you're doing it you typically
don't need to change anything here.
And regarding these experimental options I'll have a look at them specifically add experimental decorators
later in the decorators module.
This basically enabled certain features to be used in typescript which are really experimental where
it's not sure if they will end up in JavaScript at sometime in the future and where you still might
want to work with them.
Then you explicitly have to tell typescript that you want to work with these features and you can do
that with that configuration but again it will come back to that and therefore now we walked through
this file.
Lot of options you can set there and ask typescript grows.
You typically also get more and more options.
This.
Therefore the official docs are of course always a great place to dive deeper and to make sure that
you don't miss an interesting option that might help you in your project.