From 57879fda5a28312d2177145665b16cab78a56282 Mon Sep 17 00:00:00 2001 From: Manusan Date: Mon, 10 Jul 2017 17:47:28 +0200 Subject: [PATCH] binary flag is gone on ping and pong which reduces the options object to the mask boolean --- types/ws/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/ws/index.d.ts b/types/ws/index.d.ts index fc072727e8..8dc6cfa746 100644 --- a/types/ws/index.d.ts +++ b/types/ws/index.d.ts @@ -43,8 +43,8 @@ declare class WebSocket extends events.EventEmitter { close(code?: number, data?: any): void; pause(): void; resume(): void; - ping(data?: any, options?: { mask?: boolean; binary?: boolean }, dontFail?: boolean): void; - pong(data?: any, options?: { mask?: boolean; binary?: boolean }, dontFail?: boolean): void; + ping(data?: any, mask?: boolean, dontFail?: boolean): void; + pong(data?: any, mask?: boolean, dontFail?: boolean): void; send(data: any, cb?: (err: Error) => void): void; send(data: any, options: { mask?: boolean; binary?: boolean }, cb?: (err: Error) => void): void; stream(options: { mask?: boolean; binary?: boolean }, cb?: (err: Error, final: boolean) => void): void; @@ -76,8 +76,8 @@ declare class WebSocket extends events.EventEmitter { addListener(event: 'close', cb: (code: number, message: string) => void): this; addListener(event: 'headers', cb: (headers: {}, request: http.IncomingMessage) => void): this; addListener(event: 'message', cb: (data: WebSocket.Data, flags: { binary: boolean }) => void): this; - addListener(event: 'ping', cb: (data: Buffer, flags: { binary: boolean }) => void): this; - addListener(event: 'pong', cb: (data: Buffer, flags: { binary: boolean }) => void): this; + addListener(event: 'ping', cb: (data: Buffer) => void): this; + addListener(event: 'pong', cb: (data: Buffer) => void): this; addListener(event: 'open', cb: () => void): this; addListener(event: 'unexpected-response', cb: (request: http.ClientRequest, response: http.IncomingMessage) => void): this; addListener(event: string, listener: () => void): this;