UNPKG

@othree.io/excuses

Version:

Excuses

18 lines 775 B
/** * Custom Error class representing a duplication error, typically used when an attempt is made to create an entity that already exists. */ export declare class DuplicateError extends Error { /** Static error code to identify the error type. */ static ERROR: string; /** Optional identifier of the entity involved in the duplication. */ id?: string; /** * Creates a new DuplicateError. * * @param {string} [id] - Optional identifier of the entity that is considered a duplicate. * @param {string} [type] - Optional type or category of the entity. * @param {string} [message] - Optional custom error message. */ constructor(id?: string, type?: string, message?: string); } //# sourceMappingURL=duplicate-error.d.ts.map