UNPKG

error-collector

Version:
36 lines 839 B
export declare class ErrorBag { private errors; constructor(); /** * @param {Error} error * @description Adds an error to the bag * @returns void */ add(error: unknown): void; /** * @description Returns all errors in the bag * @returns {Error[]} errors */ getErrors(): Error[]; /** * @description Returns true if bag is not empty * @returns boolean */ hasErrors(): boolean; /** * @description Removes all errors from the bag * @returns void */ clear(): void; /** * @description Logs all error messages to the console * @returns void */ logErrors(): void; /** * @description Handles all errors in one Error * @returns void */ handleErrors(): void; } //# sourceMappingURL=ErrorBag.d.ts.map