UNPKG

altair-graphql-core

Version:

Several of the core logic for altair graphql client

12 lines 753 B
import { z } from 'zod/v4'; /** * This function strips default values from a Zod object schema, returning a new schema * that does not include any default values. This is useful when you want to * validate data without applying defaults. * * NOTE: This function only strips top-level defaults and does not handle nested schemas. * @param schema * @returns */ export declare function stripDefaults<T extends z.core.$ZodShape>(schema: z.ZodObject<T>): z.ZodObject<{ -readonly [P in keyof { [K in keyof T]: T[K] extends z.ZodDefault<infer Inner extends z.core.SomeType> ? Inner : T[K]; }]: { [K in keyof T]: T[K] extends z.ZodDefault<infer Inner extends z.core.SomeType> ? Inner : T[K]; }[P]; }, z.core.$strip>; //# sourceMappingURL=schema.d.ts.map