@elsikora/cladi
Version:
Zero-dependency TypeScript DI toolkit with typed tokens and scoped lifecycles.
22 lines • 797 B
TypeScript
import type { IError } from '../../../domain/interface/index';
import type { IBaseErrorOptions } from '../../interface/index';
/**
* Base error class.
* @see {@link https://elsikora.com/docs/cladi/core-concepts/error-handling}
*/
export declare class BaseError extends Error implements IError {
get cause(): Error | undefined;
get code(): string;
get context(): Record<string, unknown> | undefined;
get source(): string | undefined;
private readonly CODE;
private readonly CONTEXT?;
private readonly SOURCE?;
/**
* Creates a new base error.
* @param {string} message Error message.
* @param {IBaseErrorOptions} options Error options.
*/
constructor(message: string, options: IBaseErrorOptions);
}
//# sourceMappingURL=error.class.d.ts.map