A better way to use 3rd-part types (Extract & Exclude)

Поделиться
HTML-код
  • Опубликовано: 12 мар 2023
  • TypeScript has a ton of really great utility types that come built-in, and this video highlights two that, I think, don't get enough attention. It's Extract and Exclude. These types are great for making powerful utility functions and also for easy use of library types.
    #typescript #javascript #reactjs #reactquery
  • НаукаНаука

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

  • @Lambdaphile
    @Lambdaphile Год назад +2

    Fav TypeScript content! :)

  • @lifeofcode
    @lifeofcode Год назад +4

    Thanks so much for the top notch content! Been really enjoying leveling up my typescript skills with you!

  • @Gers217
    @Gers217 Год назад +8

    I ❤ typescript

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

    Damn man, I thought I knew Typescript but this last example with react-query takes it to another level. And comes at just the right time as I am implementing react-query in a project right now. Thanks Andrew!

  • @fagnersales532
    @fagnersales532 Год назад +2

    I've been struggling with some ts problems that might be solved using these solutions, gonna check it out! Thank you for the content

  • @markzuckerbread1865
    @markzuckerbread1865 Год назад +2

    Easy to understand and useful, thanks :)

  • @fardeenpanjwani-si7yv
    @fardeenpanjwani-si7yv Год назад +4

    What then is the difference between Omit, Pick and Extract, Exclude?

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

      Yeah where does it make sense to opt for Omit/Pick over the others?

    • @Couchwurst
      @Couchwurst Год назад +1

      The difference is about the type these util types expect. The Omit/Pick types work on interfaces, Extract/Exclude are about union types.

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

    Hmm thanks for the video. Quick qn: Where does the difference come in between Omit, Pick and Extract, Exclude?

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

    Where do you learn this stuff?

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

    Is this called Error Boundaries?

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

    hi Andrew! i'm your fan)
    I'm currently writing a technical article and I would like to ask you to review it before publication. Can you help me with that? How can I connect with you?

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

      i sent connect via linkedin

    • @andrew-burgess
      @andrew-burgess  Год назад

      Hey! Email me at the address on my site shaky.sh

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

      @@andrew-burgess I feel stupid because I can't find an email address on your site

    • @andrew-burgess
      @andrew-burgess  Год назад

      @@edgarabgaryan8989 I should make it more visible, but at the bottom of any post. Try this one: shaky.sh/tools/

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

      @@andrew-burgess document.body.innerHTML.includes('@') === false