mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
move req.user to http-errors-tests.d.ts
This commit is contained in:
parent
a591dbfa8e
commit
dcd4fb55fa
5
http-errors/http-errors-tests.d.ts
vendored
Normal file
5
http-errors/http-errors-tests.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
declare namespace Express {
|
||||
export interface Request {
|
||||
user?: any
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
/// <reference path="http-errors.d.ts" />
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
/// <reference path="../http-errors/http-errors-tests.d.ts" />
|
||||
|
||||
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)
|
||||
|
||||
6
http-errors/http-errors.d.ts
vendored
6
http-errors/http-errors.d.ts
vendored
@ -3,12 +3,6 @@
|
||||
// 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 {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user