1
00:00:00,490 --> 00:00:01,330
Hello, everyone.

2
00:00:01,450 --> 00:00:04,690
So here we find ourselves in a brand new lessem.

3
00:00:06,540 --> 00:00:13,320
So you might think to ask, why are you talking about TypeScript in this course?

4
00:00:13,440 --> 00:00:21,120
And in fact, you remember back when we began and we were, well, editing the component components

5
00:00:21,120 --> 00:00:27,450
in our first project, we mentioned something about using TypeScript throughout the course, but you

6
00:00:27,450 --> 00:00:33,350
also were basically thinking, hmm, well, it seems like all we need is JavaScript for Angular.

7
00:00:33,900 --> 00:00:37,500
So what's with TypeScript and what else aren't you going to tell me?

8
00:00:38,920 --> 00:00:43,810
Right, so, of course, when we ask this question, well, first of all, I'm going to tell you everything,

9
00:00:44,860 --> 00:00:50,050
but the first answer is, TypeScript is the superset of JavaScript.

10
00:00:51,600 --> 00:00:55,080
If he didn't know that wow, just blew your mind, if you did know that, it's like, well, why did

11
00:00:55,080 --> 00:00:56,010
it take so long to tell me?

12
00:00:57,130 --> 00:01:03,580
But in other words, TypeScript offers us all of the features of JavaScript, as well as some additional

13
00:01:03,580 --> 00:01:10,750
features, for example, JavaScript allows for basic string no or object definitions, but we can't

14
00:01:10,750 --> 00:01:16,630
control them in the way that we can when we use typescript.

15
00:01:16,900 --> 00:01:21,820
So, for example, let's say you have a number variable in JavaScript, but you string or something

16
00:01:21,820 --> 00:01:22,990
else afterwards.

17
00:01:23,590 --> 00:01:29,440
And while you won't get an error but in typescript, you cannot do this because you will get an error

18
00:01:29,740 --> 00:01:32,290
while running before compiling.

19
00:01:32,860 --> 00:01:36,190
Remember that little example I showed you in the very first lesson?

20
00:01:37,450 --> 00:01:45,700
And the fact is that as you progress, it will allow more robust choices because your code is checked

21
00:01:45,700 --> 00:01:46,790
as soon as you write it.

22
00:01:47,410 --> 00:01:55,660
So where is the main benefit that typescript will offer us is minimizing the possibility of making mistakes

23
00:01:55,900 --> 00:01:58,300
by showing us these unexpected errors.

24
00:01:59,860 --> 00:02:01,720
So why don't we just use TypeScript?

25
00:02:01,990 --> 00:02:02,380
Well.

26
00:02:03,400 --> 00:02:09,520
The weird thing is, TypeScript doesn't work either because it's basically not a programming language.

27
00:02:10,710 --> 00:02:16,410
Therefore, TypeScript is compiled and eventually converted to JavaScript.

28
00:02:17,350 --> 00:02:20,410
And that's why it works so easily on browser's.

29
00:02:21,400 --> 00:02:27,370
So CROI is needed within this build process, and if you're going to ask me why CROI?

30
00:02:27,650 --> 00:02:34,090
Well, all right, because it's thanks to see Allai, this compilation process can be performed very

31
00:02:34,090 --> 00:02:34,600
quickly.

32
00:02:34,600 --> 00:02:39,820
And in the end our code is run as JavaScript in the browser.

33
00:02:40,520 --> 00:02:43,690
In fact, technically we can prepare Angular with JavaScript.

34
00:02:43,690 --> 00:02:52,300
But yeah, it's not necessarily correct and a logical approach because Angular was prepared with TypeScript

35
00:02:52,780 --> 00:02:56,440
and we already mentioned that TypeScript has more features in JavaScript anyway.

36
00:02:56,440 --> 00:02:56,680
Right.

37
00:02:57,350 --> 00:02:58,870
So that's why.

38
00:02:58,870 --> 00:03:02,170
And therefore we're going to be working with TypeScript throughout the course.

39
00:03:02,680 --> 00:03:08,620
Don't worry, you're actually already a lot more familiar with TypeScript than you think.

40
00:03:09,040 --> 00:03:10,140
We're going to cover it all.

41
00:03:10,150 --> 00:03:17,230
And as you continue, you're going to realize how much you actually know about TypeScript because of

42
00:03:17,590 --> 00:03:18,640
JavaScript.

43
00:03:19,970 --> 00:03:27,140
So briefly, the working logic of typescript like that before finishing out, then we're going to dive

44
00:03:27,140 --> 00:03:29,510
into typescript topics.

45
00:03:30,360 --> 00:03:34,820
So first we need to create its extension file to work with typescript.

46
00:03:35,990 --> 00:03:43,310
Then after writing our code in his file, will install TypeScript Trans Pilar, and that will.

47
00:03:44,290 --> 00:03:45,490
Compiler Cotes.

48
00:03:46,670 --> 00:03:55,670
So the compiled codes will then be converted to jazz extension files, so JavaScript and then they'll

49
00:03:55,670 --> 00:03:56,870
be able to run on the browser.

50
00:03:57,260 --> 00:04:03,410
So, yes, indeed, my friends, I hope that I gave you a sufficient answer to the question of why are

51
00:04:03,410 --> 00:04:04,400
we doing TypeScript?

52
00:04:04,760 --> 00:04:09,210
And now we can get into the typescript topics in the next lesson.

53
00:04:09,500 --> 00:04:10,220
I'll see you there.
