Hello, everyone.
So here we find ourselves in a brand new lessem.
So you might think to ask, why are you talking about TypeScript in this course?
And in fact, you remember back when we began and we were, well, editing the component components
in our first project, we mentioned something about using TypeScript throughout the course, but you
also were basically thinking, hmm, well, it seems like all we need is JavaScript for Angular.
So what's with TypeScript and what else aren't you going to tell me?
Right, so, of course, when we ask this question, well, first of all, I'm going to tell you everything,
but the first answer is, TypeScript is the superset of JavaScript.
If he didn't know that wow, just blew your mind, if you did know that, it's like, well, why did
it take so long to tell me?
But in other words, TypeScript offers us all of the features of JavaScript, as well as some additional
features, for example, JavaScript allows for basic string no or object definitions, but we can't
control them in the way that we can when we use typescript.
So, for example, let's say you have a number variable in JavaScript, but you string or something
else afterwards.
And while you won't get an error but in typescript, you cannot do this because you will get an error
while running before compiling.
Remember that little example I showed you in the very first lesson?
And the fact is that as you progress, it will allow more robust choices because your code is checked
as soon as you write it.
So where is the main benefit that typescript will offer us is minimizing the possibility of making mistakes
by showing us these unexpected errors.
So why don't we just use TypeScript?
Well.
The weird thing is, TypeScript doesn't work either because it's basically not a programming language.
Therefore, TypeScript is compiled and eventually converted to JavaScript.
And that's why it works so easily on browser's.
So CROI is needed within this build process, and if you're going to ask me why CROI?
Well, all right, because it's thanks to see Allai, this compilation process can be performed very
quickly.
And in the end our code is run as JavaScript in the browser.
In fact, technically we can prepare Angular with JavaScript.
But yeah, it's not necessarily correct and a logical approach because Angular was prepared with TypeScript
and we already mentioned that TypeScript has more features in JavaScript anyway.
Right.
So that's why.
And therefore we're going to be working with TypeScript throughout the course.
Don't worry, you're actually already a lot more familiar with TypeScript than you think.
We're going to cover it all.
And as you continue, you're going to realize how much you actually know about TypeScript because of
JavaScript.
So briefly, the working logic of typescript like that before finishing out, then we're going to dive
into typescript topics.
So first we need to create its extension file to work with typescript.
Then after writing our code in his file, will install TypeScript Trans Pilar, and that will.
Compiler Cotes.
So the compiled codes will then be converted to jazz extension files, so JavaScript and then they'll
be able to run on the browser.
So, yes, indeed, my friends, I hope that I gave you a sufficient answer to the question of why are
we doing TypeScript?
And now we can get into the typescript topics in the next lesson.
I'll see you there.