export interface BaseErrorData { id?: string; code?: string; message?: string; cause?: unknown; [key: string]: unknown; } /** * Class representing an error. */ export default class BaseError extends Error { readonly name: string; /** * A unique identifier for this error. */ readonly id: string; /** * Whether the error is operational. */ readonly isOperational: boolean; protected static readonly defaultCode: string; /** * A machine-readable error code which identifies the specific type of error. */ readonly code: string; /** * Additional error information. */ readonly data: { [key: string]: unknown; }; constructor(message?: string | BaseErrorData); constructor(message: string, data?: BaseErrorData); /** * Reserved keys that should not appear in `BaseError.prototype.data`. */ protected static reservedKeys: string[]; protected static readonly defaultId: string; protected static readonly defaultMessage: string; /** * Check whether an error object is marked as operational. */ static isErrorMarkedAsOperational(error: Error): boolean; /** * Normalize a machine-readable error code. */ private static normalizeErrorCode; } //# sourceMappingURL=base-error.d.ts.map