mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
fix export finalhandle as function
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/// <reference path="./finalhandler.d.ts" />
|
||||
|
||||
import {ServerRequest, ServerResponse} from "http";
|
||||
import finalHandler from "finalhandler";
|
||||
import * as finalHandler from "finalhandler";
|
||||
|
||||
let req: ServerRequest;
|
||||
let res: ServerResponse;
|
||||
|
||||
Vendored
+9
-7
@@ -8,13 +8,15 @@
|
||||
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?: finalHandler.Options): (err: any) => void;
|
||||
|
||||
namespace finalHandler {
|
||||
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;
|
||||
export = finalHandler;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user