With that we're almost done with the Corps types.
There is one more type which we already saw and that's the.
Any type the any type is the most flexible type you can assign and typescript this type doesn't tell
typescript anything.
It basically means you can store any kind of value in there.
We got no specific type assignment typescript will basically never yell at you when you use any back
in our code here if I would set the type of favorite activities to any would not get an error if I said
it to any array.
I at least tell typescript that favorite activities is an array of something.
So if it would store just a single value in there I would get an error.
But as long as it is an array I can store whatever I want in there.
So any is really flexible and this can sound great at first but actually it's a big disadvantage and
you absolutely want to a white any whenever possible because any takes away basically all advantages
typescript gives you it gives you the same experience you have with vanilla javascript where you also
have to any type on everything so to say any basically make sure that the typescript compiler can't
check anything because if any property or any variable can store any value well then there's not much
to check right.
So you can use any as a fallback if you have some value some kind of data where you really can't know
which kind of data will be stored in there and where you then maybe are using some runtime checks like
we did here at runtime to narrow down what you want to do for certain values then you could go with
any.
But in other cases you really won a wide any if you have a chance of knowing which kind of data you're
working with.
Be explicit about it.
Let us type scripts inference do its job or explicitly set your own types don't fall back to any if
you don't need to.