Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

zod Property 'extends' does not exist on type 'ZodUnion

Girbal answered on May 10, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Property 'toHaveTextContent' does not exist on type 'JestMatchers<any>'
  • property does not exist on type any typescript

  • zod Property 'extends' does not exist on type 'ZodUnion

    0

    The `.union` considers the schemas as **totally different** objects. Example: you can think "reversed" and create a parent object (vehicule) that will either be extended by children (if you have different fields) or just use an enum like so:

    Popularity 1/10 Helpfulness 1/10 Language typescript
    Source: Grepper
    Tags: typescript zod
    Link to this answer
    Share Copy Link
    Contributed on May 10 2023
    Girbal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.