In TypeScript, interfaces and types are often interchangeable.
@housecor159.742 Follower
56.144 Aufrufe
10 Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)

@housecor
Full course with a 20% discount:
6 Likes

@tymzap
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.
4 Likes

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

@housecor
@mattpocockuk Thanks! And yep Matt is a fantastic teacher
2 Likes

@tombyrer
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.
2 Likes

@housecor
@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
3 Likes

@technically_zac
1:19 seconds of 🔥🔥🔥
1 Like

@housecor
Thanks!
1 Like

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

@jroadev
Great tips for such commons workarounds while working with TS!
1 Like
