aveazul
Version:
Bluebird drop-in replacement built on native Promise
21 lines (20 loc) • 691 B
TypeScript
/**
* OperationalError class for representing errors that are expected during normal operation
* Similar to Bluebird's OperationalError
*/
export declare class OperationalError extends Error {
isOperational: boolean;
constructor(message: string);
}
/**
* Check if an error is an operational error
* @param error - Error to check
* @returns True if the error is operational
*/
export declare function isOperationalError(error: unknown): boolean;
/**
* Check if an error is a programmer error (unexpected, likely a bug)
* @param error - Error to check
* @returns True if the error is a programmer error
*/
export declare function isProgrammerError(error: unknown): boolean;