error-lib
Version:
Standard Error Library for JavaScript/TypeScript projects (NodeJS & Browsers)
27 lines • 741 B
TypeScript
export interface ApplicationErrorConstructorOptions<TCauseError extends Error = Error> {
/**
* Error code
*/
code?: string;
/**
* The cause of this error (or the parent error)
*/
cause?: TCauseError;
}
export declare class ApplicationError<TCause extends Error = Error> extends Error {
/**
* Error code (e.g. E_APPLICATION_ERROR)
*/
readonly code: string;
/**
* The cause of this error (or the parent error)
*/
readonly cause?: Error;
/**
*
* @param message Custom error message
* @param opts Extra options
*/
constructor(message?: string, opts?: ApplicationErrorConstructorOptions<TCause>);
}
//# sourceMappingURL=application_error.d.ts.map