Loading video...
Video Failed to Load
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

Full course with a 20% discount:

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.

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

@mattpocockuk Thanks! And yep Matt is a fantastic teacher

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.

@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

1:19 seconds of 🔥🔥🔥

Thanks!

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

Great tips for such commons workarounds while working with TS!

