Exploring a classic approach to setting up an expressjs server with socketio:
this.app = express();
this.server = http.createServer(this.app);
this.io = socket(this.server);
Encountering errors when using TypeScript:
src/server/ts/app.ts(23,38): error TS2345: Argument of type 'Application' is not assignable to parameter of type '(request: IncomingMessage, response: ServerResponse) => void'.
src/server/ts/app.ts(24,8): error TS2339: Property 'io' does not exist on type 'App'.
src/server/ts/app.ts(24,25): error TS2339: Property 'server' does not exist on type 'App'.
In need of guidance on how to manage this situation. What would be the correct way to address these issues?