Type Alias WsApiRequestHandler<RequestCommandsT, ResponseCommandsT, CommandNameT, QueryT, ExtraArgsT>

WsApiRequestHandler<RequestCommandsT, ResponseCommandsT, CommandNameT, QueryT, ExtraArgsT>: ((args: {
    connectionId: string;
    express: {
        next: NextFunction;
        req: Request;
        ws: WebSocket;
    };
    extras: ExtraArgsT;
    input: RequestCommandsT[CommandNameT]["valueType"];
    output: WsApiResponders<ResponseCommandsT>;
    query: QueryT;
}) => Promise<void>)

Type Parameters

  • RequestCommandsT extends AnyCommands
  • ResponseCommandsT extends AnyCommands
  • CommandNameT extends keyof RequestCommandsT & string
  • QueryT extends AnyQuery
  • ExtraArgsT extends Record<string, any> = Record<string, never>