1 | // Type definitions for on-finished 2.3
|
2 | // Project: https://github.com/jshttp/on-finished
|
3 | // Definitions by: Honza Dvorsky <https://github.com/czechboy0>
|
4 | // BendingBender <https://github.com/BendingBender>
|
5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
6 |
|
7 | /// <reference types="node" />
|
8 | import { IncomingMessage, OutgoingMessage } from 'http';
|
9 |
|
10 | export = onFinished;
|
11 |
|
12 | declare function onFinished<T extends IncomingMessage | OutgoingMessage>(msg: T, listener: (err: Error | null, msg: T) => void): T;
|
13 |
|
14 | declare namespace onFinished {
|
15 | function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
|
16 | }
|