mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
finalhandler: tests have been added
This commit is contained in:
parent
804d7addcc
commit
bcba8a96fd
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);
|
||||
Loading…
Reference in New Issue
Block a user