Typescript Function Overloading - Is It Good Enough?

preview_player
Показать описание

Learn Typescript function overloading and how it works. It allows us to create multiple signatures for the function and only one implementation.

🛠 Need a video editor?

📌 Social

This video is NOT sponsored. Some product links are affiliate links which means if you buy something I'll receive a small commission.
Рекомендации по теме
Комментарии
Автор

Honestly if I wanted to save space in the params I think I'd just add a type property above and apply within there what I expect the function can use or return. But damn I love your videos!

nick.h
Автор

Good to know, but not really usable. Even if you have the overloads you still have to implicitly check what is the parameter type.

ivelintodorov
Автор

I'd probably just use the non-overloading version, I think it looks simpler lol

juanmacias
welcome to shbcf.ru