# @types/on-finished

> TypeScript definitions for on-finished

Latest version **2.3.5** (published 2025-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/on-finished
pnpm add @types/on-finished
yarn add @types/on-finished
bun add @types/on-finished
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.3.5 |
| Published | 2025-06-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51429 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/on-finished
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished
- npm.io page: https://npm.io/package/@types/on-finished

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 2.3.5 (latest) — 2025-06-07
- 2.3.4 (ts4.6) — 2023-11-07
- 2.3.2 (ts4.3) — 2023-09-03
- 2.3.1 (ts3.4) — 2017-08-21
- 2.3.3 — 2023-10-18
- 2.3.0 — 2017-08-16
- 2.2.29 — 2016-09-19
- 2.2.28 — 2016-07-14
- 2.2.27-alpha — 2016-07-08
- 2.2.26-alpha — 2016-07-04
- 2.2.25-alpha — 2016-07-02
- 2.2.24-alpha — 2016-07-01
- 2.2.23-alpha — 2016-07-01
- 2.2.22-alpha — 2016-05-25
- 2.2.21-alpha — 2016-05-20
- … 2 more at https://npm.io/package/@types/on-finished/versions

## README

# Installation
> `npm install --save @types/on-finished`

# Summary
This package contains type definitions for on-finished (https://github.com/jshttp/on-finished).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/on-finished/index.d.ts)
````ts
/// <reference types="node" />
import { IncomingMessage, OutgoingMessage } from "http";

export = onFinished;

declare function onFinished<T extends IncomingMessage | OutgoingMessage>(
    msg: T,
    listener: (err: Error | null, msg: T) => void,
): T;

declare namespace onFinished {
    function isFinished(msg: IncomingMessage | OutgoingMessage): boolean;
}

````

### Additional Details
 * Last updated: Sat, 07 Jun 2025 02:15:25 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Honza Dvorsky](https://github.com/czechboy0), [BendingBender](https://github.com/BendingBender), and [Sebastian Beltran](https://github.com/bjohansebas).

---
_Source: https://npm.io/package/@types/on-finished · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
