TypeScript Challenge!

preview_player
Показать описание
#shorts
Рекомендации по теме
Комментарии
Автор

I don't like this example to introduce generics, because it doesn't utilize the generic at all. Using
`function { getDescription(): string }[]): string { ... }`
has the same effect and doesn't need a generic.

fardolieri
Автор

I think TSLint or strict mode compilation will prevent this from happening. But retrofitting that into an existing long term project is a real time hole.

johnsimon
Автор

I saw the error right away! Yay for knowing something in typescript!
Great video!

BenRogersWPG
Автор

Why do you need a generic if you'll get just a plain string back? 😅

SviatoslavDanylenko
visit shbcf.ru