From 4c2711f4cf264b6191d28aff0d715a005cf8713b Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 6 Aug 2015 17:20:02 -0700 Subject: [PATCH] Make 'ajaxUrl' non-optional in 'jquery-jsonrpcclient'. --- jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts index 94981217b..fd620ba7f 100644 --- a/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts +++ b/jquery-jsonrpcclient/jquery-jsonrpcclient.d.ts @@ -6,7 +6,7 @@ /// interface JsonRpcClientOptions extends JQueryAjaxSettings { - ajaxUrl?: string; + ajaxUrl: string; headers?: {[key:string]: any}; socketUrl?: string; onmessage?: (ev: MessageEvent) => void; @@ -14,6 +14,12 @@ interface JsonRpcClientOptions extends JQueryAjaxSettings { onclose?: (ev: CloseEvent) => void; onerror?: (ev: Event) => void; getSockect?: (onmessageCb: () => void) => WebSocket; + + /** + * Sets timeout for calls in milliseconds. + * Works with WebSocket as well as AJAX. + */ + timeout?: number; } interface JsonRpcClient {