PokeVideoPlayer v0.9-rev1 - licensed under gpl3-or-later
Views : 55,792
Genre:
Uploaded At Dec 21, 2023 ^^
warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.91 (66/2,873 LTDR)
97.75% of the users lieked the video!!
2.25% of the users dislieked the video!!
User score: 96.63- Overwhelmingly Positive
RYD date created : 2024-09-19T17:25:27.645176Z
See in json
Top Comments of this video!! :3
interface declaration merging goes hand in hand with module augmentation. some examples:
- defining custom matchers in jest
- correcting a type in an upstream package
- defining custom jsx elements
- convenient global types for modules - e.x. Express.User, which is the type of req.user in an express app. You can extend this type to add your own properties to req.user. This is similar to the jest example
IMO types are usually better but sometimes your problem can only be solved with an interface, and sometimes you are defining some type that classes shoulr conform to (a proper OOP "interface").
1 |
@fabien-bouvier
9 months ago
The semantic behind interfaces is to describe an object behavior contract. It's an OOP concept. A class can implement several interfaces. It kinda solves the unique inheritance limitation and allows to write very generic code by expanding Liskov Substitution capabilities in OOP.
This why you should use interfaces. For everything else, use types. The right tool for the right job. Both have their purpose.
12 |