build(deps): update @types/express-session to 1.17.3

This commit is contained in:
sct
2021-02-02 10:02:21 +00:00
parent 77bf730f15
commit d957730a39
3 changed files with 17 additions and 6 deletions

View File

@@ -4,10 +4,6 @@ import type { User } from '../entity/User';
declare global {
namespace Express {
export interface Session {
userId?: number;
}
export interface Request {
user?: User;
}
@@ -19,3 +15,11 @@ declare global {
next: NextFunction
) => Promise<void | NextFunction> | void | NextFunction;
}
// Declaration merging to apply our own types to SessionData
// See: (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/express-session/index.d.ts#L23)
declare module 'express-session' {
export interface SessionData {
userId: number;
}
}