Defjs
Core

WebSocketEndpoint

Operation returned by defineWebSocket.

@defjs/core · Type

Signature

type WebSocketEndpoint<
  Args extends unknown[],
  Incoming,
  Outgoing = never,
> = (
  client: Client,
  ...args: Args
) => Promise<SocketAwaitResult<Incoming, Outgoing>>;

The first argument is a Client. Further arguments are the input only. Calling it opens the session and returns the existing error-first tuple.

Parameters

Prop

Type

client Client
...args? Args
Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao