# @types/finalhandler

> TypeScript definitions for finalhandler

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

## Install

```sh
npm install @types/finalhandler
pnpm add @types/finalhandler
yarn add @types/finalhandler
bun add @types/finalhandler
```

## 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 | 1.2.4 |
| 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.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.2.4 (latest) — 2025-06-07
- 1.2.3 (ts4.5) — 2023-11-07
- 1.2.0 (ts4.1) — 2022-09-12
- 1.1.1 (ts3.6) — 2021-07-06
- 1.1.0 (ts3.2) — 2019-04-12
- 1.2.2 — 2023-10-18
- 1.2.1 — 2023-09-14
- 0.0.33 — 2018-09-27
- 0.0.32 — 2017-07-25
- 0.0.31 — 2016-11-22
- 0.0.30 — 2016-10-26
- 0.0.29 — 2016-09-19
- 0.0.28 — 2016-07-14
- 0.0.27-alpha — 2016-07-08
- 0.0.26-alpha — 2016-07-04
- … 7 more at https://npm.io/package/@types/finalhandler/versions

## README

# Installation
> `npm install --save @types/finalhandler`

# Summary
This package contains type definitions for finalhandler (https://github.com/pillarjs/finalhandler).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/finalhandler.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/finalhandler/index.d.ts)
````ts
/// <reference types="node" />

import { IncomingMessage, ServerResponse } from "http";

declare function finalhandler(
    req: IncomingMessage,
    res: ServerResponse,
    options?: finalhandler.Options,
): (err?: any) => void;

declare namespace finalhandler {
    interface Options {
        env?: string | undefined;
        onerror?: ((err: any, req: IncomingMessage, res: ServerResponse) => void) | undefined;
    }
}

export = finalhandler;

````

### 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 [Ilya Mochalov](https://github.com/chrootsu), [Mark Veronda](https://github.com/hbomark), and [Sebastian Beltran](https://github.com/bjohansebas).

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