stage changes to index.d.ts

This commit is contained in:
zhengbli
2016-10-24 22:52:02 -07:00
parent 5a5ababe92
commit 2f4b18f28f
25 changed files with 539 additions and 372 deletions
+9 -7
View File
@@ -8,12 +8,14 @@
import {ServerRequest, ServerResponse} from "http";
export interface Options {
message?: boolean | ((err: any, status: number) => string);
onerror?: (err: any, req: ServerRequest, res: ServerResponse) => void;
stacktrace?: boolean;
declare function finalHandler(req: ServerRequest, res: ServerResponse, options?: finalHandler.Options): (err: any) => void;
declare namespace finalHandler {
export interface Options {
message?: boolean|((err: any, status: number) => string);
onerror?: (err: any, req: ServerRequest, res: ServerResponse) => void;
stacktrace?: boolean;
}
}
declare function finalHandler(req: ServerRequest, res: ServerResponse, options?: Options): (err: any) => void;
export default finalHandler;
export = finalHandler;