UNPKG

1.49 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/finalhandler`
3
4# Summary
5This package contains type definitions for finalhandler (https://github.com/pillarjs/finalhandler).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/finalhandler.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/finalhandler/index.d.ts)
10````ts
11// Type definitions for finalhandler 1.2
12// Project: https://github.com/pillarjs/finalhandler
13// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
14// Mark Veronda <https://github.com/hbomark>
15// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
16
17/// <reference types="node" />
18
19import { IncomingMessage, ServerResponse } from 'http';
20
21declare function finalhandler(req: IncomingMessage, res: ServerResponse,
22 options?: finalhandler.Options): (err?: any) => void;
23
24declare namespace finalhandler {
25 interface Options {
26 env?: string | undefined;
27 onerror?: ((err: any, req: IncomingMessage, res: ServerResponse) => void) | undefined;
28 }
29}
30
31export = finalhandler;
32
33````
34
35### Additional Details
36 * Last updated: Mon, 12 Sep 2022 23:02:40 GMT
37 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
38 * Global values: none
39
40# Credits
41These definitions were written by [Ilya Mochalov](https://github.com/chrootsu), and [Mark Veronda](https://github.com/hbomark).
42
\No newline at end of file