diff --git a/http-errors/http-errors-tests.d.ts b/http-errors/http-errors-tests.d.ts new file mode 100644 index 0000000000..f6fad5ac4e --- /dev/null +++ b/http-errors/http-errors-tests.d.ts @@ -0,0 +1,5 @@ +declare namespace Express { + export interface Request { + user?: any + } +} diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index 4403259008..e5e0c97567 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -1,5 +1,6 @@ /// /// +/// import * as createError from 'http-errors'; import * as express from 'express'; @@ -11,7 +12,6 @@ app.use(function (req, res, next) { next(); }); - /* Examples taken from https://github.com/jshttp/http-errors/blob/1.3.1/test/test.js */ // createError(status) diff --git a/http-errors/http-errors.d.ts b/http-errors/http-errors.d.ts index 745e313995..48d7469ba4 100644 --- a/http-errors/http-errors.d.ts +++ b/http-errors/http-errors.d.ts @@ -3,12 +3,6 @@ // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare namespace Express { - export interface Request { - user?: any - } -} - declare module 'http-errors' { namespace createHttpError {