From 2e2524ab4e50079dfb0a9ed2eeb7f66abecea777 Mon Sep 17 00:00:00 2001 From: Terence Lewis Date: Wed, 26 Jun 2013 10:04:11 +0200 Subject: [PATCH] Made the SignalR definition 0.9 compatible Changed the return type of HubConnection.received to match SignalR.received The 'on' callback can take a variable number of arguments --- signalr/signalr.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signalr/signalr.d.ts b/signalr/signalr.d.ts index 6078a7d3c2..00a5240b5d 100644 --- a/signalr/signalr.d.ts +++ b/signalr/signalr.d.ts @@ -65,7 +65,7 @@ interface HubProxy { (connection: HubConnection, hubName: string): HubProxy; init(connection: HubConnection, hubName: string): void; hasSubscriptions(): bool; - on(eventName: string, callback: (msg) => void ): HubProxy; + on(eventName: string, callback: (...msg) => void ): HubProxy; off(eventName: string, callback: (msg) => void ): HubProxy; invoke(methodName: string, ...args: any[]): JQueryDeferred; } @@ -79,7 +79,7 @@ interface HubConnectionSettings { interface HubConnection extends SignalR { //(url?: string, queryString?: any, logging?: bool): HubConnection; proxies; - received(callback: (data: { Id; Method; Hub; State; Args; }) => void ): void; + received(callback: (data: { Id; Method; Hub; State; Args; }) => void ): HubConnection; createHubProxy(hubName: string): HubProxy; }