UNPKG

1.07 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/on-finished`
3
4# Summary
5This package contains type definitions for on-finished (https://github.com/jshttp/on-finished).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished/index.d.ts)
10````ts
11/// <reference types="node" />
12import { IncomingMessage, OutgoingMessage } from "http";
13
14export = onFinished;
15
16declare function onFinished<T extends IncomingMessage | OutgoingMessage>(
17 msg: T,
18 listener: (err: Error | null, msg: T) => void,
19): T;
20
21declare namespace onFinished {
22 function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
23}
24
25````
26
27### Additional Details
28 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
29 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
30
31# Credits
32These definitions were written by [Honza Dvorsky](https://github.com/czechboy0), and [BendingBender](https://github.com/BendingBender).
33
\No newline at end of file