diff --git a/finalhandler/finalhandler-tests.ts b/finalhandler/finalhandler-tests.ts
new file mode 100644
index 000000000..cb8dc053d
--- /dev/null
+++ b/finalhandler/finalhandler-tests.ts
@@ -0,0 +1,17 @@
+///
+
+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);
diff --git a/finalhandler/finalhandler.d.ts b/finalhandler/finalhandler.d.ts
new file mode 100644
index 000000000..37e931718
--- /dev/null
+++ b/finalhandler/finalhandler.d.ts
@@ -0,0 +1,20 @@
+// Type definitions for finalhandler
+// Project: https://github.com/pillarjs/finalhandler
+// Definitions by: Ilya Mochalov
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+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;
+}