Add definitions for api-error-handler (https://github.com/expressjs/api-error-handler)

This commit is contained in:
Tanguy Krotoff
2015-07-03 13:31:26 +02:00
parent 715bd098cb
commit 188cbfcb0c
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
/// <reference path="api-error-handler.d.ts" />
import errorHandler = require('api-error-handler');
import express = require('express');
var api = express.Router();
api.get('/users/:userid', function (req, res, next) {
});
api.use(errorHandler());

View File

@@ -0,0 +1,14 @@
// Type definitions for api-error-handler v1.0.0
// Project: https://github.com/expressjs/api-error-handler
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../express/express.d.ts" />
declare module 'api-error-handler' {
import express = require('express');
function apiErrorHandler(options?: any): express.ErrorRequestHandler;
export = apiErrorHandler;
}