import type { PascalCase } from "type-fest"; import { ParseParams, SafeParseReturnType, ZodArray, ZodFunction, ZodIntersection, ZodLazy, ZodMap, ZodNullable, ZodObject, ZodOptional, ZodPromise, ZodRawShape, ZodRecord, ZodSet, ZodTuple, ZodType, ZodTypeAny, ZodUnion, z } from "zod"; type Ctor = { [key: string]: any; new (input: any): T; }; export interface ZodClass extends ZodType { shape: Shape; staticProps: StaticProperties; pick(...mask: Mask[]): Z.Class>; pick(mask: Mask): Z.Class : never; }[keyof Mask]>>; omit(...mask: Mask[]): Z.Class>; omit(mask: Mask): Z.Class : never; }[keyof Mask]>>; schema(this: Ctor): z.ZodType; extend(this: Super, shape: ChildShape): StaticProperties & { [k in Exclude>]: Super[k]; } & ZodClass> & ConstructorParameters[0], Z.output> & InstanceType, Omit & ChildShape>; optional(this: Self): ZodOptional; nullable(this: Self): ZodNullable; array(this: Self): ZodArray; promise(this: Self): ZodPromise; or(this: Self, other: Other): ZodUnion<[Self, Other]>; and(this: Self, other: Other): ZodIntersection; parse(this: Ctor, value: unknown): T; parseAsync(this: Ctor, value: unknown): Promise; safeParse(this: Ctor, data: unknown, params?: Partial): SafeParseReturnType; safeParseAsync(this: Ctor, data: unknown, params?: Partial): Promise>; new (data: Members): Instance; } type OptionalKeys = { [k in keyof Shape]: undefined extends Z.output ? k : never; }[keyof Shape]; export declare namespace Z { type output = T extends new (...args: any[]) => infer R ? R : T extends ZodObject ? { [k in keyof Pick>>]: Z.output; } & { [k in OptionalKeys]+?: Z.output; } : T extends ZodArray ? Z.output[] : T extends ZodOptional ? Z.output | undefined : T extends ZodNullable ? Z.output | null : T extends ZodTuple ? { [i in keyof T]: Z.output; } : T extends ZodRecord ? { [k in Extract, string | number | symbol>]: Z.output; } : T extends ZodMap ? Map, Z.output> : T extends ZodSet ? Set> : T extends ZodFunction ? (...args: Z.output) => Z.output : T extends ZodLazy ? Z.output : T extends ZodPromise ? Promise> : T extends ZodType ? z.output : never; type input = T extends new (...args: any[]) => infer R ? R : T extends ZodObject ? { [k in keyof Pick>>]: Z.input; } & { [k in OptionalKeys]+?: Z.input; } : T extends ZodArray ? Z.input[] : T extends ZodOptional ? Z.input | undefined : T extends ZodNullable ? Z.input | null : T extends ZodTuple ? { [i in keyof T]: Z.input; } : T extends ZodRecord ? { [k in Extract, string | number | symbol>]: Z.input; } : T extends ZodMap ? Map, Z.input> : T extends ZodSet ? Set> : T extends ZodFunction ? (...args: Z.input) => Z.input : T extends ZodLazy ? Z.input : T extends ZodPromise ? Promise> : T extends ZodType ? z.input : never; } type StaticProperties = { [property in keyof Shape as PascalCase]: Shape[property]; }; export declare namespace Z { type Class = StaticProperties & ZodClass>, Z.output>, Shape>; } export declare const Z: { class(shape: T): Z.Class; }; export {}; //# sourceMappingURL=index.d.ts.map