From 1fbb55213f263b44b6997380c38248ef448f07bd Mon Sep 17 00:00:00 2001 From: BrennanConroy Date: Thu, 23 Aug 2018 09:43:32 -0700 Subject: [PATCH] Fix w3cwebsocket type definitions --- types/websocket/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;