mirror of
https://github.com/coder/code-server.git
synced 2025-07-31 05:54:15 +08:00
Some cleanup
- Use whateverEmitter.event for the onWhatever methods. - Add readonly to a bunch of things. - Remove some redundancy in types. - Move initializations out of the constructor and into the declarations where it was reasonable to do so. - Disable a few no-any violations.
This commit is contained in:
@ -20,12 +20,12 @@ export interface ServerOptions {
|
||||
}
|
||||
|
||||
export class Server {
|
||||
private readonly sessions: Map<number, Process> = new Map();
|
||||
private readonly connections: Map<number, net.Socket> = new Map();
|
||||
private readonly servers: Map<number, net.Server> = new Map();
|
||||
private readonly evals: Map<number, ActiveEvaluation> = new Map();
|
||||
private readonly sessions = new Map<number, Process>();
|
||||
private readonly connections = new Map<number, net.Socket>();
|
||||
private readonly servers = new Map<number, net.Server>();
|
||||
private readonly evals = new Map<number, ActiveEvaluation>();
|
||||
|
||||
private connectionId: number = Number.MAX_SAFE_INTEGER;
|
||||
private connectionId = Number.MAX_SAFE_INTEGER;
|
||||
|
||||
public constructor(
|
||||
private readonly connection: ReadWriteConnection,
|
||||
|
Reference in New Issue
Block a user