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 😊
  • НаукаНаука

Комментарии • 19

  • @alidev6882
    @alidev6882 2 месяца назад

    i get ask thus topic in every interview and i explained wron everytime, now i got the proper understanding, thanks mate

  • @ImranShaikh-lu6wq
    @ImranShaikh-lu6wq 5 месяцев назад

    Thanks, hope we enjoy more generic videos in future.

  • @user-ky4nt5ib2j
    @user-ky4nt5ib2j 7 месяцев назад

    And i also understood generics , Thank you very much sir

  • @snekface1707
    @snekface1707 8 месяцев назад

    Thanks for the tutorial. Trying to wrap my head around generics and this helped a lot!

  • @computerhoofd
    @computerhoofd Год назад

    Very concise

  • @DreamStreet2012
    @DreamStreet2012 Год назад

    This is the best explanation I have seen so far

  • @maximes.3209
    @maximes.3209 8 месяцев назад

    Thank you for making this video, it helps me a lot !

  • @Di-yes
    @Di-yes Год назад +1

    Man, that's good really 🤔very nice for such dummies like me

  • @betomoedano
    @betomoedano Год назад

    Great video bro!

  • @md.mohiulislam6516
    @md.mohiulislam6516 Год назад

    awsome

  • @carol00210
    @carol00210 8 месяцев назад

    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?

  • @thedavistheory7674
    @thedavistheory7674 8 месяцев назад

    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

    • @sf-spark129
      @sf-spark129 7 месяцев назад +1

      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 ?