/// <reference path="leaf.d.ts" />
declare namespace Leaf {
    class ErrorDoc<TErrors> {
        private errorNames;
        private errors;
        static create<TErrors>(): ErrorDoc<TErrors>;
        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;
    };
}
