/** * Importing npm packages */ import { type ErrorCode, type ErrorType } from './error-code.error.js'; /** * Defining types */ export interface AppErrorObject { code: string; type: ErrorType; message: string; } /** * Declaring the constants */ export declare class AppError extends Error { protected readonly error: TErrorCode; protected readonly data?: Record | undefined; constructor(error: TErrorCode, data?: Record | undefined); getCause(): Error | undefined; setCause(cause: Error): this; getType(): ErrorType; getCode(): string; getMessage(): string; getData(): Record | undefined; toObject(): AppErrorObject; }