mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
finalhandler: definition of the module has been added
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// Type definitions for finalhandler
|
||||
// Project: https://github.com/pillarjs/finalhandler
|
||||
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../node/node.d.ts" />
|
||||
|
||||
declare module "finalhandler" {
|
||||
import {ServerRequest, ServerResponse} from "http";
|
||||
|
||||
export interface Options {
|
||||
message?: boolean|((err: any, status: number) => string);
|
||||
onerror?: (err: any, req: ServerRequest, res: ServerResponse) => void;
|
||||
stacktrace?: boolean;
|
||||
}
|
||||
|
||||
function finalHandler(req: ServerRequest, res: ServerResponse, options?: Options): (err: any) => void;
|
||||
|
||||
export default finalHandler;
|
||||
}
|
||||
Reference in New Issue
Block a user