fix for Express requests that are authenticated (have user property)

This commit is contained in:
C. Fuhrman 2024-09-30 11:47:41 -04:00
parent e28fa40b69
commit b527aa9ade
2 changed files with 12 additions and 1 deletions

View file

@ -108,5 +108,6 @@
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": ["./**/*.ts"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"files":["types.d.ts"]
}

10
server/types.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
// Authentication middleware has user property added to the request object.
// https://stackoverflow.com/a/62631740/1168342
declare namespace Express {
export interface Request {
user: any;
}
export interface Response {
user: any;
}
}