parent-namespace.d.ts 932 B

123456789101112131415
  1. import { Namespace } from "./namespace";
  2. import type { Server, RemoteSocket } from "./index";
  3. import type { EventParams, EventNames, EventsMap, DefaultEventsMap } from "./typed-events";
  4. export declare class ParentNamespace<ListenEvents extends EventsMap = DefaultEventsMap, EmitEvents extends EventsMap = ListenEvents, ServerSideEvents extends EventsMap = DefaultEventsMap, SocketData = any> extends Namespace<ListenEvents, EmitEvents, ServerSideEvents, SocketData> {
  5. private static count;
  6. private children;
  7. constructor(server: Server<ListenEvents, EmitEvents, ServerSideEvents, SocketData>);
  8. /**
  9. * @private
  10. */
  11. _initAdapter(): void;
  12. emit<Ev extends EventNames<EmitEvents>>(ev: Ev, ...args: EventParams<EmitEvents, Ev>): boolean;
  13. createChild(name: string): Namespace<ListenEvents, EmitEvents, ServerSideEvents, SocketData>;
  14. fetchSockets(): Promise<RemoteSocket<EmitEvents, SocketData>[]>;
  15. }