forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
finalhandler.d.ts
20 lines (15 loc) · 677 Bytes
/
finalhandler.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Type definitions for finalhandler
// Project: https://github.com/pillarjs/finalhandler
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "finalhandler" {
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;
}
function finalHandler(req: ServerRequest, res: ServerResponse, options?: Options): (err: any) => void;
export default finalHandler;
}