import { AbstractError } from '@matrixai/errors'; import ErrorPolykey from '../ErrorPolykey.js'; /** * Generic error containing all parsing errors that occurred during * execution. */ declare class ErrorValidation extends ErrorPolykey { static description: string; exitCode: 65; errors: Array; constructor(message: any, data: any); /** * This packages an `ErrorParse` array into the `data` property * This is to allow encoding to and decoding from RPC errors */ static createFromErrors(errors: Array): ErrorValidation; } /** * Exception to be thrown during parsing failure * This is not part of the Polykey exception hierarchy * This is because it plain exception wrapper parsing error data * While JS allows us to throw POJOs directly, having a nominal type * is easier to check against */ declare class ErrorParse extends AbstractError { static description: string; exitCode: 65; keyPath: Array; value: any; context: object; } export { ErrorValidation, ErrorParse };