[signalr-no-jquery] Updating definitions (#46227)

* Update signalr-no-jquery\index.d.ts

* update header

* update header v
This commit is contained in:
Dmitry 2020-08-28 14:46:38 +05:00 committed by GitHub
parent 53149cf417
commit ebba75438a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
// Project: https://github.com/DVLP/signalr-no-jquery/
// Definitions by: Martin Gjoshevski <https://github.com/gjoshevski>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
// TypeScript Version: 4.0
export function hubConnection(url?: string, options?: Options): Connection;
@ -24,9 +24,13 @@ export interface Connection {
*/
createHubProxy(hubName: string): Proxy;
start(options?: any, callback?: any): any;
start(options?: any, callback?: () => void): any;
stop(async?: boolean, notifyServer?: boolean): void;
reconnecting(callback: () => void): void;
disconnected(callback: () => void): void;
}
export interface Proxy {
@ -41,14 +45,14 @@ export interface Proxy {
* @param eventName The name of the hub event to register the callback for.
* @param callback The callback to be invoked.
*/
on(eventName: string, callback: (...msg: any[]) => void): Proxy;
on(eventName: string, callback?: (...msg: any[]) => void): Proxy;
/**
* Removes the callback invocation request from the server hub for the given event name.
*
* @param eventName The name of the hub event to unregister the callback for.
* @param callback The callback to be invoked.
*/
off(eventName: string, callback: (...msg: any[]) => void): Proxy;
off(eventName: string, callback?: (...msg: any[]) => void): Proxy;
/**
* Invokes a server hub method with the given arguments.
*