From 533000b4906b2c1b54cb9a723b7458167d54cab9 Mon Sep 17 00:00:00 2001 From: Zhangyuan Nie Date: Wed, 17 Apr 2019 05:21:02 -0400 Subject: [PATCH] Docs: update index.d.ts (#122) Some arguments are optional --- docs/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.d.ts b/docs/index.d.ts index 2ac6195..9325546 100644 --- a/docs/index.d.ts +++ b/docs/index.d.ts @@ -11,13 +11,13 @@ type RecognizedString = string | ArrayBuffer | Uint8Array | Int8Array | Uint16Ar /** A WebSocket connection that is valid from open to close event */ interface WebSocket { /** Sends a message. Make sure to check getBufferedAmount() before sending. Returns true for success, false for built up backpressure that will drain when time is given. */ - send(message: RecognizedString, isBinary: boolean, compress: boolean) : boolean; + send(message: RecognizedString, isBinary?: boolean, compress?: boolean) : boolean; /** Returns the bytes buffered in backpressure. */ getBufferedAmount() : number; /** Gradefully closes this WebSocket. Immediately calls close handler. */ - end(code: number, shortMessage: RecognizedString) : WebSocket; + end(code?: number, shortMessage?: RecognizedString) : WebSocket; /** Forefully closes this WebSocket. Immediately calls close handler. */ close() : WebSocket;