mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-15 22:40:21 +00:00
Update passport-tests.ts
https://stackoverflow.com/questions/40349987/how-to-suppress-typescript-error-ts2533-object-is-possibly-null-or-undefine
This commit is contained in:
@@ -148,7 +148,7 @@ declare global {
|
||||
|
||||
app.use((req: express.Request, res: express.Response, next: (err?: any) => void) => {
|
||||
if (req.user) {
|
||||
req.user.username = "hello user";
|
||||
req.user!.username = "hello user";
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user