Skip to content
Myr

fix(helper/websocket): allow custom events to be passed to generics (#3616)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(helper/websocket): allow custom events to be passed to generics * chore: disable any * add tests * patch * test patch

authored by EdamAmex · committed by GitHub · parent ae6165b · Browse files · 3 files+50 added−49 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+50 added−49 removed

  • tests:+3 added−4 removed
  • other:+47 added−45 removed

3 files+50 added−49 removed

modified:src/adapter/cloudflare-workers/websocket.test.ts+3 added-4 removed
modified:src/adapter/cloudflare-workers/websocket.ts+45 added-43 removed
modified:src/helper/websocket/index.ts+2 added-2 removed
18 unmodified lines
1920/**21 * Upgrade WebSocket Type22 */23export type UpgradeWebSocket<T = unknown, U = any> = (24 createEvents: (c: Context) => WSEvents<T> | Promise<WSEvents<T>>,23export type UpgradeWebSocket<T = unknown, U = any, _WSEvents = WSEvents<T>> = (24 createEvents: (c: Context) => _WSEvents | Promise<_WSEvents>,25 options?: U26) => MiddlewareHandler<27 any,28 string,
88 unmodified lines