Zod's Object Parsing: A Game Changer for TypeScript

Поделиться
HTML-код
  • Опубликовано: 23 фев 2023
  • Instead of having to check each property of an object or do some funny type checking yourself, with zod, you can validate the shape of an object with parsing! It's super convenient and can also benefit the security of your web projects. Let's take a look at how it works!
    ⭐ Our startup: wordful.ai
    ⭐ My GitHub: github.com/joschan21
    The stuff I use to make my videos
    Camera: amzn.to/3XcqRKO
    Light: amzn.to/3Xc1yIE
    Keyboard: amzn.to/3CKxnAi
    Mouse: amzn.to/3CNcfcm
    Microphone: amzn.to/3iybVHC
    Headphones: amzn.to/3IHTTgH
    thats pretty much it. Those are affiliate links so I might earn a commission if you purchase after clicking them. :^)
  • НаукаНаука

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

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

    Nice quick demonstration of Zod, its is super nice. I really enjoy working with react hook form (rhf) and Zod for forms validation, can recommend!

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

    Great quality Josh! Love watching your stuff

  • @kartik-k
    @kartik-k Год назад

    Finest video I have seen on zod🔥🤯

  • @coolmind2476
    @coolmind2476 3 месяца назад

    Is it possible to parse an unknown object without schema and get the types of the unknown objects components?

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

    so should I use safeparse or parse?

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

    Sir please consider my request for setting up prettier and eslint in our project and what are the other precaution we can take in mid to large size project in order to scale it.

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

      If you can’t set up your own config files why are you building a mid to large project?

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

    you can use ts-node to run typescript files without it being as much of a pain to set up

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

      scratch that esrun is way better

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

    Is there any way to convert directly user object to zod schema .ie can we use user object at the time of zod object creation ? Please help

  • @wyattandfriendshailey
    @wyattandfriendshailey 11 месяцев назад +1

    Kneel before Zod

  • @skyzane2735
    @skyzane2735 7 месяцев назад

    What about Valibot? I see few people are now saying in youtube that Valibot would be better than Zod.

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

    saying javascript does not highlight syntax errors but typescript does is just wrong, both js and ts are purely text with some defined rules, so if you don’t have highlighting of the errors you are just lacking a static analyzer tool like eslint on your text editor. It is just that vscode comes with tsserver that would highlight you these errors when writing typescript but it is not like “javascript does not have static code analysis” 😅😅