mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Update passport-tests.ts
This commit is contained in:
@@ -138,13 +138,15 @@ passportInstance.use(new TestStrategy());
|
||||
const authenticator = new passport.Authenticator();
|
||||
authenticator.use(new TestStrategy());
|
||||
|
||||
declare namespace Express {
|
||||
interface User {
|
||||
username: string;
|
||||
}
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface User {
|
||||
username: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.use((req, res, next) => {
|
||||
console.log(req.user.username);
|
||||
req.user.username = "hello user";
|
||||
next();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user