Merge pull request #28333 from BrennanConroy/fix-w3cwebsocket

Fix w3cwebsocket type definitions
This commit is contained in:
Armando Aguirre
2018-08-29 16:30:36 -07:00
committed by GitHub
+4 -2
View File
@@ -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;