(shape: z.ZodRawShape)
| 47 | } |
| 48 | |
| 49 | function getRequireds(shape: z.ZodRawShape) { |
| 50 | const keys: string[] = []; |
| 51 | for (const key in shape) { |
| 52 | const fieldShape = shape[key]; |
| 53 | if ( |
| 54 | !(fieldShape instanceof z.ZodDefault) && |
| 55 | !(fieldShape instanceof z.ZodOptional) |
| 56 | ) |
| 57 | keys.push(key); |
| 58 | } |
| 59 | return keys; |
| 60 | } |
| 61 | |
| 62 | function parseShape( |
| 63 | shape: z.ZodRawShape, |