mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Made SignalR compliant with --noImplicitAny
This commit is contained in:
@@ -60,7 +60,7 @@ interface MyHubConnection extends HubConnection {
|
||||
};
|
||||
// My Hubs Server function:
|
||||
server: {
|
||||
send(message: string);
|
||||
send(message: string): any;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ function test_hubs() {
|
||||
proxy.invoke('send', msg);
|
||||
proxy.invoke('send', msg, room);
|
||||
proxy.invoke('add', 1, 2)
|
||||
.done(function (result) {
|
||||
.done(function (result: any) {
|
||||
console.log('The result is ' + result);
|
||||
});
|
||||
proxy.on('addMessage', function (msg?) {
|
||||
|
||||
Vendored
+9
-8
@@ -1,13 +1,14 @@
|
||||
// Type definitions for SignalR 1.0
|
||||
// Project: http://www.asp.net/signalr
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
||||
// Modified by: T. Michael Keesey <https://github.com/keesey/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
interface HubMethod {
|
||||
(callback: (data: string) => void );
|
||||
(callback: (data: string) => void ): any;
|
||||
}
|
||||
|
||||
interface SignalREvents {
|
||||
@@ -75,8 +76,8 @@ interface HubProxy {
|
||||
hubName: string;
|
||||
init(connection: HubConnection, hubName: string): void;
|
||||
hasSubscriptions(): boolean;
|
||||
on(eventName: string, callback: (...msg) => void ): HubProxy;
|
||||
off(eventName: string, callback: (msg) => void ): HubProxy;
|
||||
on(eventName: string, callback: (...msg: any[]) => void ): HubProxy;
|
||||
off(eventName: string, callback: (msg: any) => void ): HubProxy;
|
||||
invoke(methodName: string, ...args: any[]): JQueryDeferred<any>;
|
||||
}
|
||||
|
||||
@@ -88,18 +89,18 @@ interface HubConnectionSettings {
|
||||
|
||||
interface HubConnection extends SignalR {
|
||||
//(url?: string, queryString?: any, logging?: boolean): HubConnection;
|
||||
proxies;
|
||||
received(callback: (data: { Id; Method; Hub; State; Args; }) => void ): HubConnection;
|
||||
proxies: any;
|
||||
received(callback: (data: { Id: any; Method: any; Hub: any; State: any; Args: any; }) => void ): HubConnection;
|
||||
createHubProxy(hubName: string): HubProxy;
|
||||
}
|
||||
|
||||
interface SignalRfn {
|
||||
init(url, qs, logging);
|
||||
init(url: any, qs: any, logging: any): any;
|
||||
}
|
||||
|
||||
interface ConnectionSettings {
|
||||
transport?;
|
||||
callback?;
|
||||
transport?: any;
|
||||
callback?: any;
|
||||
waitForPageLoad?: boolean;
|
||||
jsonp?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user