From a591dbfa8e5ee74d3e1a0a0b6ec28601746ccdcc Mon Sep 17 00:00:00 2001 From: "Cao, Jiannan" Date: Mon, 11 Jul 2016 23:16:06 +0800 Subject: [PATCH] add user to http-errors.d.ts --- http-errors/http-errors-tests.ts | 6 ------ http-errors/http-errors.d.ts | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index d1400bbe4c..4403259008 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -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) { diff --git a/http-errors/http-errors.d.ts b/http-errors/http-errors.d.ts index 48d7469ba4..745e313995 100644 --- a/http-errors/http-errors.d.ts +++ b/http-errors/http-errors.d.ts @@ -3,6 +3,12 @@ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare namespace Express { + export interface Request { + user?: any + } +} + declare module 'http-errors' { namespace createHttpError {