Skip to content
Myr

fix(websocket): Fix typo in WSContextInit type (#3575)

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

authored by Ariel-Moroshko · committed by GitHub · parent 3a59d86 · Browse files · 2 files+11 added−11 removed
This commit

State

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

Diff stats

2 files+11 added−11 removed

  • tests:+8 added−8 removed
  • other:+3 added−3 removed

2 files+11 added−11 removed

modified:src/helper/websocket/index.test.ts+8 added-8 removed
modified:src/helper/websocket/index.ts+3 added-3 removed
37 unmodified lines
3839/**40 * An argument for WSContext class41 */42export interface WSContestInit<T = unknown> {42export interface WSContextInit<T = unknown> {43 send(data: string | ArrayBuffer, options: SendOptions): void44 close(code?: number, reason?: string): void4546 raw?: T
12 unmodified lines
59/**60 * A context for controlling WebSockets61 */62export class WSContext<T = unknown> {63 #init: WSContestInit<T>64 constructor(init: WSContestInit<T>) {63 #init: WSContextInit<T>64 constructor(init: WSContextInit<T>) {65 this.#init = init66 this.raw = init.raw67 this.url = init.url ? new URL(init.url) : null68 this.protocol = init.protocol ?? null
51 unmodified lines