You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678
  1. import type { ZodArray, ZodNullable, ZodObject, ZodOptional, ZodRawShape, ZodTuple, ZodTupleItems, ZodTypeAny } from "../index";
  2. export declare namespace partialUtil {
  3. type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
  4. [k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
  5. }, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
  6. [k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
  7. } extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
  8. }