In this video we're going to move on to our next big subject which is type meditations and type inference.
These are technically two different systems inside of typescript but we're going to talk about them
in parallel for a very good reason just to make things a little bit more complicated as well.
These two different features apply slightly differently to variable declarations functions and objects.
So we're going to first talk about type annotations and inference as applied to variables.
We'll take a break and talk about them applied to functions and then objects and so on.
For each of these different subjects we're going to once again through go through some plain definition
and overview.
Well then take a look at some different code examples that we're gonna write out together.
You'll notice I swap these two steps right here this time around.
So we'll then talk about why we care about this annotation and inference stuff and we'll discuss when
to use it.
So let's get to it.
First off some plain definitions.
So type meditations.
What is that.
A type invitation is some tiny bit of code that you and I are going to write to tell typescript what
type of value a variable refers to.
All right.
Now before expanding on that definition let's talk about what type inferences.
So type inference type script is going to attempt to automatically figure out what type of value a variable
refers to.
And you'll notice that the kind of definition of both these are very similar in both cases it's what
type of valuable if you mean what type of value a variable will refer to.
So the interesting thing about type annotations and type inference is that they're kind of at odds with
each other.
In one case you and I are adding in a little bit of code to tell typescript what different types we
are working with with type inference.
We are relying upon typescript to do that work for us.
So these two features are a question of are you and I are going to do everything manually or are we
going to leave it up to typescript.
That's what the big question here is.
And that's what got what is going to be the big focus of our discussion about you know why we care about
these features in went to use them.
Let's take a quick pause right here.
We're gonna come back the next video and start taking a look at a couple of different code samples.
So a quick pause and I'll see you in just a minute.