1
00:00:00,730 --> 00:00:05,140
In this video, we're going to start to discuss interfaces in TypeScript, so as usual, we'll get a

2
00:00:05,140 --> 00:00:07,689
plain definition, some examples and so on.

3
00:00:08,260 --> 00:00:10,760
As a quick aside here, we're going to spend a pretty good amount of time.

4
00:00:10,760 --> 00:00:16,960
And TypeScript, talking about interfaces, the interplay between interfaces and classes is how we're

5
00:00:16,960 --> 00:00:20,920
going to really get very strong code reuse when we are writing typescript code.

6
00:00:21,500 --> 00:00:26,850
So if you understand interfaces really well, it's going to help you design really excellent applications.

7
00:00:27,490 --> 00:00:31,870
As a matter of fact, the entire second half of this course where we're going to work on a lot of applications

8
00:00:31,870 --> 00:00:36,790
is really going to come down to understanding how we can get interfaces and classes to work together

9
00:00:36,970 --> 00:00:38,470
really, really nicely.

10
00:00:39,490 --> 00:00:43,480
So if you don't understand this first, take through interfaces, totally fine, because we're going

11
00:00:43,480 --> 00:00:45,080
to be discussing them quite a bit.

12
00:00:45,700 --> 00:00:46,110
All right.

13
00:00:46,120 --> 00:00:48,430
So with that in mind, let's take a look at a quick definition here.

14
00:00:49,180 --> 00:00:54,580
So when we have interfaces, we are going to write out some amount of code to define a new type inside

15
00:00:54,580 --> 00:00:55,310
of application.

16
00:00:55,990 --> 00:01:01,390
The goal, this new type is to describe the different property names and a different property types

17
00:01:01,750 --> 00:01:03,130
that that object has.

18
00:01:04,190 --> 00:01:08,660
So when we create an interface, we are creating a new type inside of application, just the same way

19
00:01:08,660 --> 00:01:14,200
that we have types like String or Boolean or no, we're creating another new type.

20
00:01:14,390 --> 00:01:17,240
It's a custom type that you and I are going to define.

21
00:01:18,320 --> 00:01:21,830
Now, understanding interfaces is a lot easier when you have some code in front of you.

22
00:01:22,010 --> 00:01:25,730
So let's do a quick pause right here, come back in the next video and start to write out some examples.

