@etsoo/shared
Version:
TypeScript shared utilities and functions
18 lines (17 loc) • 391 B
TypeScript
/**
* Error with custom data
* Other information can be hold by 'name', 'cause', and 'stack' property
*
*/
export declare class DataError<T = Record<string, unknown>> extends Error {
/**
* Custom data
*/
readonly data: T;
/**
* Constructor
* @param message Error message
* @param data Custom data
*/
constructor(message: string, data: T);
}