add user to http-errors.d.ts

This commit is contained in:
Cao, Jiannan
2016-07-11 23:16:06 +08:00
parent 6245fffb18
commit a591dbfa8e
2 changed files with 6 additions and 6 deletions
-6
View File
@@ -4,12 +4,6 @@
import * as createError from 'http-errors';
import * as express from 'express';
declare namespace Express {
export interface Request {
user?: any
}
}
var app = express();
app.use(function (req, res, next) {
+6
View File
@@ -3,6 +3,12 @@
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace Express {
export interface Request {
user?: any
}
}
declare module 'http-errors' {
namespace createHttpError {