The `rl` property on `Express.Request` provides a standard way to access
the cache and socket server objects across requests. This allows us to
split up the routes into multiple files for easier development.
import { Player } from '../../shared/player';
+import { Server } from 'socket.io';
+
+interface RL {
+ cache: Map<string, any>,
+ io: Server
+}
declare module 'express-serve-static-core' {
interface Request {
- player: Player
+ player: Player,
+ rl: RL
}
}