mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
add user to Request for http-errors
req.user should be declared by developer.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user