declare type ServiceErrorPayload = {
    [key: string]: boolean | string | number;
};
export declare class ServerErrorFactory {
    private serviceId;
    constructor(serviceId: string);
    createPrototype<TPayload extends ServiceErrorPayload>(options: {
        id: string;
        message: string;
    }): ServiceErrorPrototype<TPayload>;
}
export declare class ServiceErrorPrototype<TPayload extends ServiceErrorPayload> {
    readonly serviceId: string;
    readonly errorId: string;
    readonly errorMessage?: string;
    constructor(serviceId: string, errorId: string, errorMessage?: string);
    create(payload: TPayload): ServiceError<TPayload>;
    formatMessage(payload: TPayload): string;
    equals(other: ServiceErrorPrototype<any>): boolean;
}
export declare class ServiceError<TPayload extends ServiceErrorPayload> extends Error {
    readonly prototype: ServiceErrorPrototype<TPayload>;
    readonly payload: TPayload;
    constructor(prototype: ServiceErrorPrototype<TPayload>, payload: TPayload);
    is(target: ServiceErrorPrototype<any> | ServiceError<any>): boolean;
}
export {};
//# sourceMappingURL=error.d.ts.map