import { ZodError, type ZodType, z } from 'zod'; /** * Type Definition: `SchemaValidationContext` * * This type is derived from a Zod schema and represents * the validated structure of `SchemaValidationContext` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#schemavalidationcontext} */ type SchemaValidationContext = { filePath?: string; }; /** * Autocompletes valid Zod Schema input for convience, but will accept any other data as well */ /** * Type Definition: `ZodInputLooseAutocomplete` * * This type is derived from a Zod schema and represents * the validated structure of `ZodInputLooseAutocomplete` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#zodinputlooseautocomplete} */ type ZodInputLooseAutocomplete = z.input | {} | null | undefined; export declare class SchemaValidationError extends Error { constructor(error: ZodError, schema: ZodType, { filePath }: SchemaValidationContext); } export declare function validate(schema: T, data: ZodInputLooseAutocomplete, context?: SchemaValidationContext): z.output; export declare function validateAsync(schema: T, data: ZodInputLooseAutocomplete, context?: SchemaValidationContext): Promise>; export {};