mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
435 B
TypeScript
16 lines
435 B
TypeScript
import { IncomingMessage, ServerResponse } from "http";
|
|
import finalHandler = require("finalhandler");
|
|
|
|
let req: IncomingMessage;
|
|
let res: ServerResponse;
|
|
let options: {
|
|
onerror: (err: any, req: IncomingMessage, res: ServerResponse) => void;
|
|
message: boolean|((err: any, status: number) => string);
|
|
stacktrace: boolean;
|
|
};
|
|
|
|
let result: (err: any) => void;
|
|
|
|
result = finalHandler(req, res);
|
|
result = finalHandler(req, res, options);
|