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
This commit is contained in:
Kevin Simper 2020-03-22 21:55:54 +01:00 committed by GitHub
parent 6ad27673b7
commit 252d080626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.