Ever since upgrading typescript and express-session, I've noticed that the tsc is now loading custom type definition stubs.
https://i.sstatic.net/T7fnu.png
Despite merging the type declaration, I still encounter this error:
https://i.sstatic.net/PJEUd.png
In addition to adding ./typing-stubs
in tsconfig.json:
"typeRoots": [
"./typing-stubs",
"./node_modules/@types"
],
The issue lies in the fact that type merging for express
is working, but not for express-session
.