Merge pull request #14109 from kacepe/patch-1

Add user object to Express.Request
This commit is contained in:
Bowden Kelly
2017-02-03 18:26:02 -08:00
committed by GitHub
+8 -1
View File
@@ -1,6 +1,6 @@
// Type definitions for express-jwt
// Project: https://www.npmjs.org/package/express-jwt
// Definitions by: Wonshik Kim <https://github.com/wokim/>
// Definitions by: Wonshik Kim <https://github.com/wokim/>, Kacper Polak <https://github.com/kacepe>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import express = require('express');
@@ -37,3 +37,10 @@ declare namespace jwt {
unless?: typeof unless;
}
}
declare global {
namespace Express {
export interface Request {
user?: any
}
}
}