(type: z.ZodType)
| 40 | } |
| 41 | |
| 42 | function getTypeIdentity(type: z.ZodType): object { |
| 43 | switch (getTypeKind(type)) { |
| 44 | case "object": |
| 45 | return (type._zod.def as z.core.$ZodObjectDef).shape; |
| 46 | case "enum": |
| 47 | return (type._zod.def as z.core.$ZodEnumDef).entries; |
| 48 | case "union": |
| 49 | return (type._zod.def as z.core.$ZodUnionDef).options; |
| 50 | } |
| 51 | return type; |
| 52 | } |
| 53 | |
| 54 | const enum TypePrecedence { |
| 55 | Union = 0, |
no test coverage detected
searching dependent graphs…