Loading video...

Video Failed to Load

Go Home

In TypeScript, interfaces and types are often interchangeable. But these are 6 features that only work with a type alias. Clip from "TypeScript: Getting Started" on Dometrain

56,130 views • 1 year ago •via X (Twitter)

10 Comments

Cory House's profile picture
Cory House1 year ago

Full course with a 20% discount:

Tymek Zapała's profile picture
Tymek Zapała1 year ago

Types are great. I do not see any reason to use interfaces - they have less use cases and brings risk of accidental declaration merging to codebase.

Ryu's profile picture
Ryu1 year ago

Seriously most of what I know about typescript I learned from you and @mattpocockuk

Cory House's profile picture
Cory House1 year ago

@mattpocockuk Thanks! And yep Matt is a fantastic teacher

tom byrer's profile picture
tom byrer1 year ago

The thing I hate about TS is that is lots of programming time that is not programming that significantly moves the needle forward. I hope @typescript team will add auto-typing in Phase 3 of their GoLang transition, or some AI wiz makes a small locally hostable model to do this.

Cory House's profile picture
Cory House1 year ago

@typescript I find adding types takes little time and tends to “flow” through the code once I’ve delivered the type once. Often mainly need types for the json fetched from APIs

ℤ's profile picture
1 year ago

1:19 seconds of 🔥🔥🔥

Cory House's profile picture
Cory House1 year ago

Thanks!

Friedrich's profile picture
Friedrich1 year ago

That's why I only use types. There is also interfaces merging that can be misleading

Juan Roa's profile picture
Juan Roa1 year ago

Great tips for such commons workarounds while working with TS!

Related Videos