/// <reference types="node" />
/// <reference types="koa" />
/// <reference types="koa-router" />
import { KOAContext, ConfigsCollection } from "@bonbons/contracts";
import { ViewTplRenderOptions, defaultViewTplRender } from "./render";
import { ConfigService } from "./configs";
export interface ErrorHandler {
    (configs: ConfigsCollection): (ctx: any, next: any) => Promise<any>;
}
export interface ErrorPageTemplate {
    (configs: ConfigsCollection): ErrorTemplateOptions;
}
export interface ErrorRenderOptions extends ViewTplRenderOptions {
}
interface ErrorTemplateOptions {
    render: (error: any) => Promise<string | Buffer | undefined>;
}
export declare const ERROR_HANDLER: import("../node_modules/@bonbons/di/node_modules/@bonbons/contracts/dist/src/di").BonbonsToken<ErrorHandler>;
export declare const ERROR_PAGE_TEMPLATE: import("../node_modules/@bonbons/di/node_modules/@bonbons/contracts/dist/src/di").BonbonsToken<ErrorPageTemplate>;
export declare const ERROR_RENDER_OPRIONS: import("../node_modules/@bonbons/di/node_modules/@bonbons/contracts/dist/src/di").BonbonsToken<ErrorRenderOptions>;
export declare const defaultErrorPageRenderOptions: {
    render: typeof defaultViewTplRender;
    extensions: string;
    cache: {};
    options: {};
};
export declare function defaultErrorHandler(configs: ConfigService): (ctx: KOAContext, next: () => Promise<any>) => Promise<void>;
export declare function defaultErrorPageTemplate(configs: ConfigsCollection): {
    render: (error: any) => Promise<any>;
};
export {};
