diff --git a/types/websocket/index.d.ts b/types/websocket/index.d.ts index cd17039b1c..0a15be7d69 100644 --- a/types/websocket/index.d.ts +++ b/types/websocket/index.d.ts @@ -679,9 +679,11 @@ declare class w3cwebsocket { url: string; readyState: number; protocol?: string; - extenstions: IExtension[]; + extensions: IExtension[]; bufferedAmount: number; + binaryType: "arraybuffer"; + CONNECTING: number; OPEN: number; CLOSING: number; @@ -692,7 +694,7 @@ declare class w3cwebsocket { onclose: () => void; onmessage: (message: any) => void; - constructor(url: string, protocols?: string[], origin?: string, headers?: any[], requestOptions?: object, clientConfig?: IClientConfig); + constructor(url: string, protocols?: string | string[], origin?: string, headers?: any[], requestOptions?: object, clientConfig?: IClientConfig); send(data: Buffer): void; send(data: IStringified): void;