Files
DefinitelyTyped/types/finalhandler/index.d.ts
Tomek Łaziuk dff062cc2a [finalhandler] support real-world use case with serve-static (#61638)
* cover real life usecase

* fix lint

* remove myself from owners
2022-09-12 15:58:28 -07:00

22 lines
751 B
TypeScript

// Type definitions for finalhandler 1.2
// Project: https://github.com/pillarjs/finalhandler
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Mark Veronda <https://github.com/hbomark>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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;