Загрузка видео...

Не удалось загрузить видео

На главную

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 просмотров • 1 год назад •via X (Twitter)

Комментарии: 10

Фото профиля Cory House
Cory House1 год назад

Full course with a 20% discount:

Фото профиля Tymek Zapała
Tymek Zapała1 год назад

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
Ryu1 год назад

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

Фото профиля Cory House
Cory House1 год назад

@mattpocockuk Thanks! And yep Matt is a fantastic teacher

Фото профиля tom byrer
tom byrer1 год назад

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
Cory House1 год назад

@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 год назад

1:19 seconds of 🔥🔥🔥

Фото профиля Cory House
Cory House1 год назад

Thanks!

Фото профиля Friedrich
Friedrich1 год назад

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

Фото профиля Juan Roa
Juan Roa1 год назад

Great tips for such commons workarounds while working with TS!

Похожие видео