From cb4960033f11e56f51d527e55e3e6fac2be6dbd1 Mon Sep 17 00:00:00 2001 From: Cao Jiannan Date: Mon, 11 Jul 2016 22:57:27 +0800 Subject: [PATCH] add user to Request for http-errors req.user should be declared by developer. --- http-errors/http-errors-tests.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index 4403259008..37dc4b3cd8 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -4,6 +4,12 @@ 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) {