import { OpenrpcDocument as OpenRPC } from "./types"; import { ErrorObject } from "ajv"; /** * @ignore */ /** * Provides an error interface for OpenRPC Document validation * * @category Errors * */ export declare class OpenRPCDocumentValidationError implements Error { name: string; message: string; /** * @param errors The errors received by ajv.errors. */ constructor(errors: ErrorObject[]); } /** * Returns any JSON Schema validation errors that are found with the OpenRPC document passed in. * * @param document OpenRPC Document to validate. * * @returns Either true if everything checks out, or a well formatted error. * * @example * ```typescript * * import { validateOpenRPCDocument } from "@open-rpc/schema-utils-js"; * const badOpenRPCDocument = {} as any; * * const result = validateOpenRPCDocument(badOpenRPCDocument); * if (result !== true) { * console.error(result); * } * ``` * */ export default function validateOpenRPCDocument(document: OpenRPC): OpenRPCDocumentValidationError | true;