import Ajv, { ErrorObject, JSONSchemaType, KeywordDefinition } from 'ajv'; export { Ajv }; /** * This type is a subset of AJV's ValidateFunction, it exists to make * .d.ts bundles smaller and to not expose all of AJV context to the * world. * @public */ export interface ValidateFunction { (this: any, data: any, dataCxt?: any): data is T; errors?: null | ErrorObject[]; } /** * This type alias exist only to avoid accidental refactors involving names of ajv * @public */ export type JSONSchema = JSONSchemaType; /** * Common structure to use types as values in TS. * @public */ export type AbstractTypedSchema = { schema: JSONSchema; validate: ValidateFunction; }; /** * Generates a validator for a specific JSON schema of a type T * @public */ export declare function generateLazyValidator(schema: JSONSchema, keywordDefinitions?: KeywordDefinition[]): ValidateFunction; /** * Validates a type with a schema in a functional way. * @public */ export declare function validateType(theType: Pick, 'validate'>, value: T): boolean; //# sourceMappingURL=validation.d.ts.map