/** * A custom error class for input errors. * * @example * const fn = () => { * throw new InputError('Invalid input', 'user.name') * } */ declare class InputError extends Error { /** * Path of input attribute that originated the error. */ path: string[]; constructor(message: string, path?: string[]); } /** * @deprecated Use `ContextError` instead * A custom error class for context errors. * * @example * const fn = () => { * throw new EnvironmentError('Invalid environment', 'user.name') * } */ declare class EnvironmentError extends Error { /** * Path of context attribute that originated the error. */ path: string[]; constructor(message: string, path?: string[]); } /** * A custom error class for context errors. * * @example * const fn = () => { * throw new ContextError('Invalid context', 'user.name') * } */ declare class ContextError extends Error { /** * Path of context attribute that originated the error. */ path: string[]; constructor(message: string, path?: string[]); } /** * A list of errors * * Useful to propagate error from mutiple composables in parallel execution */ declare class ErrorList extends Error { /** * The list of errors */ list: Error[]; constructor(errors: Error[]); } /** * A function to check if an `Error` or a `SerializableError` is an InputError */ declare function isInputError(e: { name: string; message: string; }): boolean; /** * @deprecated Use `isContextError` instead * A function to check if an `Error` or a `SerializableError` is a ContextError */ declare const isEnvironmentError: typeof isContextError; /** * A function to check if an `Error` or a `SerializableError` is a ContextError */ declare function isContextError(e: { name: string; message: string; }): boolean; export { ContextError, EnvironmentError, ErrorList, InputError, isContextError, isEnvironmentError, isInputError, }; //# sourceMappingURL=errors.d.ts.map