From 252d080626ca2928cf412cd391a1cf155bf3e397 Mon Sep 17 00:00:00 2001 From: Kevin Simper Date: Sun, 22 Mar 2020 21:55:54 +0100 Subject: [PATCH] Allow session to be null (#43240) According to the docs, destroying the session can be done by setting req.session = null https://github.com/expressjs/cookie-session#destroying-a-session --- types/cookie-session/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/cookie-session/index.d.ts b/types/cookie-session/index.d.ts index a77732aad1..fdbbbc650f 100644 --- a/types/cookie-session/index.d.ts +++ b/types/cookie-session/index.d.ts @@ -103,7 +103,7 @@ declare namespace CookieSessionInterfaces { /** * Represents the session for the given request. */ - session?: CookieSessionObject; + session?: CookieSessionObject | null; /** * Represents the session options for the current request. These options are a shallow clone of what was provided at middleware construction and can be altered to change cookie setting behavior on a per-request basis.