In the last video he spoke about why the any type is a very bad thing to have inside of application
right now coordinates is of type any and it's only the case because Jason got returns a value of type
any.
And that's because typescript just can't predict what Jason does pass is going to return.
So to fix this up one way we could fix it is to add in a type invitation for coordinates so we need
to add in a type invitation for an object.
We already saw an example of that right back up here when we defined the object literal of points.
So to add in a type annotation for an object right after the variable name were put in that colon and
then the overall structure of that object so for us we're going to add in coordinates right here.
I'll put in a colon then instead of curly braces and inside they're going to say this thing is going
to have a property called X that is a number and it's going to have a property y that is a number as
well so now we've given enough information to typescript that it can figure out what type of value coordinates
is by now mouse over it.
I see the type indentation on here.
And now if I tried to reference say coordinates dot blah blah blah I'll very quickly see an error message
that tells me that is not a property on that object okay.
That's pretty much it.
This is one of the three cases where we are going to add in type annotations anytime we call a function
that returns type any adjacent dot pass is just one of the functions in javascript that returns type
any.
There are several others as well.
It's will kind of see some those different functions over time.
And in fact we might eventually have to write our own functions that return type any as well.
All right.
Let's take a quick pause right here.
When we come back the next video we'll move on to the next example or the next case where we are going
to add in a type annotation willingly so quick pause and I'll see you in just a minute.