UNPKG

736 BTypeScriptView Raw
1// Type definitions for finalhandler 1.2
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(
12 req: IncomingMessage,
13 res: ServerResponse,
14 options?: finalhandler.Options,
15): (err?: any) => void;
16
17declare namespace finalhandler {
18 interface Options {
19 env?: string | undefined;
20 onerror?: ((err: any, req: IncomingMessage, res: ServerResponse) => void) | undefined;
21 }
22}
23
24export = finalhandler;
25
\No newline at end of file