The error is that when I run with Nodemon the server in development mode sends me the following error due to my custom types:
Property 'returnTo' does not exist on type 'Session & Partial'.
Error: Property 'returnTo' does not exist on type 'Session & Partial
This file is named express-session-types.d.ts and has the following code:
express-session-types.d.ts file
My tsconfig.json is as follows:
My package.json scripts: My package.json scripts
The solution I came up with was to force import the types into my server.ts file or project startup file as follows:
import * as sessionTypes from './types/express-session-types';
Where express-session-types is my module file with extension .d.ts where the property is declared.