///
declare namespace Leaf {
class ErrorDoc {
private errorNames;
private errors;
static create(): ErrorDoc;
define(name: string, base?: string | Error | Function, defaultProperty?: any): this;
generate(): TErrors;
}
function createError(name: string, base?: Error | Function, defaultProperty?: any): (message: string, detail: any) => void;
interface CustomErrorConstructor extends ErrorConstructor {
(message?: string, detail?: any): void;
}
const Errors: {
Timeout: CustomErrorConstructor;
Abort: CustomErrorConstructor;
IOError: CustomErrorConstructor;
NetworkError: CustomErrorConstructor;
};
}