UNPKG

750 BTypeScriptView Raw
1// Type definitions for finalhandler 1.1
2// Project: https://github.com/pillarjs/finalhandler
3// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
4// Mark Veronda <https://github.com/hbomark>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/// <reference types="node" />
8
9import { IncomingMessage, ServerResponse } from 'http';
10
11declare function finalhandler(req: IncomingMessage, res: ServerResponse,
12 options?: finalhandler.Options): (err: any) => void;
13
14declare namespace finalhandler {
15 interface Options {
16 env?: string | undefined;
17 onerror?: ((err: any, req: IncomingMessage, res: ServerResponse) => void) | undefined;
18 }
19}
20
21export = finalhandler;
22
\No newline at end of file