# Function importWebSocket

- importWebSocket(): Promise<
  {
  CLOSED: number;
  CLOSING: number;
  CONNECTING: number;
  OPEN: number;
  prototype: WebSocket;
  new (
  url: string | URL,
  protocols?: string | string[] | WebSocketInit,
  ): WebSocket;
  },
  >

  #### Returns Promise<
  {
  CLOSED: number;
  CLOSING: number;
  CONNECTING: number;
  OPEN: number;
  prototype: WebSocket;
  new (
  url: string | URL,
  protocols?: string | string[] | WebSocketInit,
  ): WebSocket;
  },
  >

  - Defined in rivetkit-typescript/packages/rivetkit/src/common/websocket.ts:6