TypeScript Generics: All You Need to Know
HTML-код
- Опубликовано: 10 фев 2023
- In this TypeScript tutorial, we explore the use of TypeScript Generics to improve code quality and explain how TypeScript Generics work in different use cases. You'll learn how to simplify your code, boost reusability, and take your TypeScript skills to the next level.
======⚡⚡⚡======
Consider supporting the channel by clicking the "Thanks" button ❤️
👉 Get a 20% discount on Brilliant.org (to learn Science, Technology, Engineering, and Math): brilliant.sjv.io/kjVO2z
======⚡⚡⚡======
🙌 Become my Patreon and get exclusive perks: / softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: / gusgadirov
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
Full documentation of Generics: www.typescriptlang.org/docs/h...
And don't forget to subscribe for more videos like this 😊 - Наука
i get ask thus topic in every interview and i explained wron everytime, now i got the proper understanding, thanks mate
Thanks, hope we enjoy more generic videos in future.
And i also understood generics , Thank you very much sir
Thanks for the tutorial. Trying to wrap my head around generics and this helped a lot!
Great to hear!
Very concise
This is the best explanation I have seen so far
Happy to hear mate!
Thank you for making this video, it helps me a lot !
You're very welcome!
Man, that's good really 🤔very nice for such dummies like me
Glad to have you here mate! We all start somewhere 😉
Great video bro!
Thanks mate 🙂
awsome
So can I say that generics help me not having to overload methods? As I wouldn't have to write different methods with different parameter types in a class?
Correct 👍
Mmmm couldn't we use a union type? Also doesn't this sorta defeat the purpose of ts? It seems like we are doing some extra steps to convert a static parameter into a dynamic one.
Those are my doubts
same question here. If we are making the type of a parameter as generics and can pass different types of parameters depending on what type we define at the function call level, what's the point of using a typed language and what's the difference b/w using the type any and generics ?