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 {