colyseus
Version:
Multiplayer Game Server for Node.js.
15 lines (11 loc) • 433 B
text/typescript
import * as WebSocket from "uws";
import * as shortid from "shortid";
// Core classes
export { Server } from "./Server";
export { Room } from "./Room";
export { Protocol } from "./Protocol";
// State Helper Types
export type EntityMap<T> = {[ entityId:string ]: T};
export function generateId () { return shortid.generate(); }
// Export 'WebSocket' as 'Client' with 'id' property.
export type Client = WebSocket & { id: string };