import { z } from "zod"; import { ParserFunction } from "../types/parser-types"; import { ZodType } from "../types/zod-like"; 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: * z.number().default(0) * // After: * z.default(z.number(), 0) */ default(schema: ZodType, defaultValue: TOutput): ParserFunction; /** * 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: z.slug("slug"), * }) */ slug(fieldName: TFieldName): readonly [`${TFieldName}.current`, z.ZodString]; }; export declare const zodMethods: ZodMethods; export type ZodMethods = typeof zodPrimitives & typeof zodExtras; export {};