UNPKG

641 BTypeScriptView Raw
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" />
8import { IncomingMessage, OutgoingMessage } from 'http';
9
10export = onFinished;
11
12declare function onFinished<T extends IncomingMessage | OutgoingMessage>(msg: T, listener: (err: Error | null, msg: T) => void): T;
13
14declare namespace onFinished {
15 function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
16}