import { z } from "zod"; import { ParserFunction } from "../types/public-types"; declare const zodPrimitives: Pick; declare const zodExtras: { /** * Zod's `.default()` method doesn't work well with GROQ, * since GROQ only returns `null` and never `undefined`. * * So instead of chaining Zod's `default` method, * use this `default` method instead. * * @example * // Before: * q.number().default(0) * // After: * q.default(q.number(), 0) */ default>(schema: TZodSchema, defaultValue: z.output): ParserFunction | null, z.output>; /** * Shorthand for accessing the current value for a slug. * * @example * // Before: * q.star.filterByType("product").project({ * slug: ["slug.current", z.string()], * }) * // After: * q.star.filterByType("product").project({ * slug: q.slug("slug"), * }) */ slug(fieldName: TFieldName): readonly [`${TFieldName}.current`, z.ZodString]; }; export declare const zodMethods: ZodMethods; export type ZodMethods = typeof zodPrimitives & typeof zodExtras; export {};