TypeScript Tutorial #15 - Interfaces

preview_player
Показать описание
Hey all, in this TypeScript tutorial we'll take a look at interfaces - which help to define the structure of objects.

🐱‍👤🐱‍👤 JOIN THE GANG -
----------------------------------------
🐱‍💻 🐱‍💻 My Udemy Courses:

🐱‍💻 🐱‍💻 Course Files:

🐱‍💻 🐱‍💻 Other Related Free Courses:

🐱‍💻 🐱‍💻 TypeScript Docs:

🐱‍💻 🐱‍💻 The Net Ninja Community Boards:
Рекомендации по теме
Комментарии
Автор

You should mention about Interfaces vs Types so that people do not get confused later. :) And in oposite. Mention Interfaces when talking about Type.

Oswee
Автор

I think interfaces intention is not about class structure only, but about creating an abstraction (contract) between two domains that allow you to decouple one part from another by not requiring one part to understand the details of the implementation. A better explanation can be found by searching for the principles of Dependency Inversion, or, Dependency Injection. Interfaces is an essential tool for polymorphism

joaopedroschmitt
Автор

first thing I do before watching a NetNinja video : hit the like button

ardavanansari
Автор

Found naming interfaces a little bit confusing in the tutorial
An interface basically describes functionality the object must have so you can interact with it. "Is-something" sounds more how you should name a type guard.
I personally prefer just "Person". In the wild, you also may come across a convention to precede interface names with "I" (from "interface"; "IPerson"), like it was popular in Java, for example

eggziom
Автор

Hi, Could you please elaborate difference b/w interface and type for defining any type like isPerson in this video

pulkitaggarwal
Автор

Hi! bro you are one of my favorite teachers..Stay blessed..

boykasarboo
Автор

Thanks Shaun for the wonderful tutorial series.

Shakeel
Автор

your videos are great. i have a request - please make videos on Nuxt js (Vue ssr)

usama_khalid
Автор

Shaun is the best!

@1:23 Maybe we have a method speak, cz people speak (lol : ) )

rahulyavvari
Автор

Thanks, a lot. You have saved me time.

Pylogicx
Автор

So, what is the difference between type & interface?

andikasaputra
Автор

Why wouldn't I just create a type alias of an object with these properties?

NikiL
Автор

It's odd that you can't extend the object with additional properties. Surely as long as it still satisfies the interface, additional properties shouldn't be a problem. This would be allowed in C# for example and would be very common, for example an object implementing multiple interfaces through a range of different properties and methods.

mylesdavies
Автор

interfaces are mostly used with classes to define a class, but in js, classes are just glorified objects. so the differences are very small.

cyanfroste
Автор

Thank you so much for this. Thank you.

victoradeniji
Автор

I hope after this series you do another one about mern or mevn stack with typescript (a big one, it could be in udemy), you're the best man!

bouamarelouahhabi
Автор

What is the difference between Interface and Type aliases?

johnconnor
Автор

So interfaces can be considered as schemas for a object, am I right?

priyojitsingha
Автор

Which syntax highlighter do you have enabled here? very cool

crucru
Автор

how can we use pick utility type on new someone person you made from same interface"inperson"

avigarg