mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update typings for signalr-no-jquery to include stop method (#37759)
This commit is contained in:
parent
15289fd4ac
commit
1e5bee16dc
30
types/signalr-no-jquery/index.d.ts
vendored
30
types/signalr-no-jquery/index.d.ts
vendored
@ -9,22 +9,24 @@ export function hubConnection(url?: string, options?: Options): Connection;
|
||||
export function signalR(url?: string, qs?: any, logging?: any): any;
|
||||
|
||||
export interface Connection {
|
||||
id: string;
|
||||
proxies: { [hubName: string]: any };
|
||||
transport: {
|
||||
name: string,
|
||||
supportsKeepAlive: SupportsKeepAliveHandler
|
||||
};
|
||||
id: string;
|
||||
proxies: { [hubName: string]: any };
|
||||
transport: {
|
||||
name: string;
|
||||
supportsKeepAlive: SupportsKeepAliveHandler;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new proxy object for the given hub connection that can be used to invoke
|
||||
* methods on server hubs and handle client method invocation requests from the server.
|
||||
*
|
||||
* @param hubName The name of the hub on the server to create the proxy for.
|
||||
*/
|
||||
createHubProxy(hubName: string): Proxy;
|
||||
/**
|
||||
* Creates a new proxy object for the given hub connection that can be used to invoke
|
||||
* methods on server hubs and handle client method invocation requests from the server.
|
||||
*
|
||||
* @param hubName The name of the hub on the server to create the proxy for.
|
||||
*/
|
||||
createHubProxy(hubName: string): Proxy;
|
||||
|
||||
start(options?: any, callback?: any): any;
|
||||
start(options?: any, callback?: any): any;
|
||||
|
||||
stop(async?: boolean, notifyServer?: boolean): void;
|
||||
}
|
||||
|
||||
export interface Proxy {
|
||||
|
||||
@ -12,3 +12,5 @@ hubProxy.on('message', (message) => {
|
||||
connection.start({ jsonp: true })
|
||||
.done(() => { console.log('Now connected, connection ID=' + connection.id); })
|
||||
.fail(() => { console.log('Could not connect'); });
|
||||
|
||||
connection.stop(false, false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user