TypeScript Interfaces vs Types
88.3 هزار بار بازدید -
4 سال پیش
-
I’m answering one of the
I’m answering one of the most asked questions from my last video: What should I use? TypeScript Interface or Type?
It’s a great question, and one I greatly struggled with when I first started learning TypeScript.
Ultimately my advice is simple: use interfaces for objects, and types for everything else.
If you want the longer answer, check out the video.
——
NEWSLETTER: https://tinyletter.com/hswolff/subscribe
PATREON: Patreon: hswolff
TWITTER: Twitter: hswolff
SITE: https://hswolff.com/
It’s a great question, and one I greatly struggled with when I first started learning TypeScript.
Ultimately my advice is simple: use interfaces for objects, and types for everything else.
If you want the longer answer, check out the video.
——
NEWSLETTER: https://tinyletter.com/hswolff/subscribe
PATREON: Patreon: hswolff
TWITTER: Twitter: hswolff
SITE: https://hswolff.com/
4 سال پیش
در تاریخ 1399/02/15 منتشر شده
است.
88,388
بـار بازدید شده