UNPKG

gather-ts

Version:

A powerful code analysis and packaging tool designed for creating AI-friendly code representations for javascript and typescript projects.

21 lines (20 loc) 1.03 kB
import { IErrorClassification, IErrorTransformation } from "../interfaces/IError"; import { IErrorUtils, IErrorUtilsDeps, IErrorUtilsOptions } from "../interfaces/IErrorUtils"; import { BaseService } from "@/types/services"; import { IBaseError, IErrorDetails } from "@/types/errors"; export declare class ErrorUtils extends BaseService implements IErrorUtils { private readonly deps; private readonly debug; constructor(deps: IErrorUtilsDeps, options?: IErrorUtilsOptions); initialize(): Promise<void>; cleanup(): void; private logDebug; isGatherTSError(error: unknown): error is IBaseError; wrapError(error: unknown, context: string): Error; formatErrorDetails(details: IErrorDetails): string; aggregateErrors(errors: Error[]): Error; classifyError(error: unknown): IErrorClassification; transformError(error: unknown, transformations: IErrorTransformation[]): Error; extractErrorContext(error: Error): Record<string, unknown>; normalizeError(error: unknown): Error; }