mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
22 lines
724 B
TypeScript
22 lines
724 B
TypeScript
// Type definitions for finalhandler 1.1
|
|
// 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;
|
|
onerror?: (err: any, req: IncomingMessage, res: ServerResponse) => void;
|
|
}
|
|
}
|
|
|
|
export = finalhandler;
|