Custom Type Guards - TypeScript Narrowing #3

แชร์
ฝัง

ความคิดเห็น • 17

  • @LucasPaganiniWeb
    @LucasPaganiniWeb  ปีที่แล้ว

    🚨 Join the waiting list for my ✨Web Animations Course✨ to get a discount when the course launches: www.lucaspaganini.com/web-animations

  • @mertciflikli
    @mertciflikli 2 ปีที่แล้ว

    very good and comprehensive explanation. thank you!

  • @SalvaToroTorus
    @SalvaToroTorus ปีที่แล้ว

    Really clear and good explanation of type predicates. Very high quality videos in general. Suscribed !

  • @frenchfries6386
    @frenchfries6386 2 ปีที่แล้ว

    Muy valiosa informacion, el video perfectamente explicado, gracias! saludos desde colombia!

  • @hectorg362
    @hectorg362 2 ปีที่แล้ว

    I'm learning TypeScript using FullStackOpen and unfortunetly I get lost with the explination. This was really helpful!

    • @LucasPaganiniWeb
      @LucasPaganiniWeb  2 ปีที่แล้ว +1

      I totally understand the feeling, I always study a topic from multiple sources to really get it 😅

  • @attiliop.8639
    @attiliop.8639 ปีที่แล้ว

    Bravissimo! Grazie.

  • @nonudian
    @nonudian 2 ปีที่แล้ว

    I recently discovered your channel, and I really enjoyed watching this series.
    So I just wanted to specify that it could be clearer for Warning/Error type guard to use "object" type instead of "unknown", this type preserving us from primitive types.
    Thanks for your awesome work!

    • @LucasPaganiniWeb
      @LucasPaganiniWeb  2 ปีที่แล้ว +1

      Hey, thanks for the feedback! I could’ve done a better job explaining why I used “unknown” there, so let me try to do that now haha:
      I don’t like the idea of having a guard that can throw for whatever reason. Refer to Lodash’s guards for example, none of them throw, they always give you true or false.
      For that reason, I have this convention with my team to always use “unknown” for guard parameters.
      It’s really not that big of a deal once you get used to it, and it avoids unexpected runtime errors 😅

  • @МБДомСемьи
    @МБДомСемьи 5 หลายเดือนก่อน

    даже то, как сделано описание под видео, профессионально. Супер

  • @LucasPaganiniWeb
    @LucasPaganiniWeb  3 ปีที่แล้ว

    Part 4 released!! 🔥 th-cam.com/video/o0v7lJF11Pg/w-d-xo.html

  • @allardgodfrey
    @allardgodfrey 2 ปีที่แล้ว

    100th like :D