class Lobby implements Serialized.Lobby{ id: string clients: Serialized.Client[] clientCounts: number[] game: string constructor(lobby: Serialized.Lobby){ this.id = lobby.id this.clients = lobby.clients this.clientCounts = lobby.clientCounts this.game = lobby.game } get leader(): Serialized.Client{ return this.clients[0] } serialized(): Serialized.Lobby{ return { id: this.id, game: this.game, clientCounts: this.clientCounts, clients: this.clients } } }