import type { Mapping } from '@mischnic/json-sourcemap'; export type SchemaEntity = SchemaObject | SchemaArray | SchemaBoolean | SchemaString | SchemaNumber | SchemaEnum | SchemaOneOf | SchemaAllOf | SchemaNot | SchemaAny; export type SchemaArray = { type: 'array'; items?: SchemaEntity; __type?: string; }; export type SchemaBoolean = { type: 'boolean'; __type?: string; }; export type SchemaOneOf = { oneOf: Array; }; export type SchemaAllOf = { allOf: Array; }; export type SchemaNot = { not: SchemaEntity; __message: string; }; export type SchemaString = { type: 'string'; enum?: Array; __validate?: (val: string) => string | null | undefined; __type?: string; }; export type SchemaNumber = { type: 'number'; enum?: Array; __type?: string; }; export type SchemaEnum = { enum: Array; }; export type SchemaObject = { type: 'object'; properties: { [key: string]: SchemaEntity; }; additionalProperties?: boolean | SchemaEntity; required?: Array; __forbiddenProperties?: Array; __type?: string; }; export type SchemaAny = Record; export type SchemaError = { type: 'type'; expectedTypes: Array; dataType: 'key' | null | undefined | 'value'; dataPath: string; ancestors: Array; prettyType?: string; } | { type: 'enum'; expectedValues: Array; dataType: 'key' | 'value'; actualValue: unknown; dataPath: string; ancestors: Array; prettyType?: string; } | { type: 'forbidden-prop'; prop: string; expectedProps: Array; actualProps: Array; dataType: 'key'; dataPath: string; ancestors: Array; prettyType?: string; } | { type: 'missing-prop'; prop: string; expectedProps: Array; actualProps: Array; dataType: 'key' | 'value'; dataPath: string; ancestors: Array; prettyType?: string; } | { type: 'other'; actualValue: unknown; dataType: 'key' | null | undefined | 'value'; message?: string; dataPath: string; ancestors: Array; }; declare function validateSchema(schema: SchemaEntity, data: unknown): Array; declare namespace validateSchema { var diagnostic: (schema: SchemaEntity, data: ({ source?: (() => string) | string | null | undefined; data?: unknown; } | { source: string | (() => string); map: { data: unknown; pointers: { [key: string]: Mapping; }; }; }) & { filePath?: string | null | undefined; prependKey?: string | null | undefined; }, origin: string, message: string) => undefined; } export default validateSchema; export declare function fuzzySearch(expectedValues: Array, actualValue: string): Array;