Empty Types #typescript #coding #english

preview_player
Показать описание
TypeScript determines if the call to fn here is valid by seeing if the provided argument is a valid Empty. It does so by examining the structure of { k: 10 } and class Empty { }. We can see that { k: 10 } has all of the properties that Empty does, because Empty has no properties. Therefore, this is a valid call!
Рекомендации по теме
welcome to shbcf.ru