mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
finalhandler: tests have been added
This commit is contained in:
17
finalhandler/finalhandler-tests.ts
Normal file
17
finalhandler/finalhandler-tests.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/// <reference path="./finalhandler.d.ts" />
|
||||
|
||||
import {ServerRequest, ServerResponse} from "http";
|
||||
import finalHandler from "finalhandler";
|
||||
|
||||
let req: ServerRequest;
|
||||
let res: ServerResponse;
|
||||
let options: {
|
||||
onerror: (err: any, req: ServerRequest, 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);
|
||||
Reference in New Issue
Block a user