allignc commencts and add spaces

This commit is contained in:
Martin Gjoshevski
2017-09-08 23:15:37 +02:00
parent f11b30afda
commit 68dd4e4407
2 changed files with 8 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export function hubConnection(url?:string, options?: Options):Connection;
export function hubConnection(url?: string, options?: Options): Connection;
export function signalR(url?: string, qs?: any, logging?: any): any;
@@ -12,7 +12,7 @@ interface Connection {
id: string;
proxies: { [hubName: string]: any };
transport: { name: string, supportsKeepAlive: () => boolean };
/**
/**
* 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.
*
@@ -20,7 +20,7 @@ interface Connection {
*/
createHubProxy(hubName: string): Proxy;
start(options?:any, callback?:any):any
start(options?: any, callback?: any): any;
}
interface Proxy {
@@ -29,21 +29,21 @@ interface Proxy {
hubName: string;
init(connection: Connection, hubName: string): void;
hasSubscriptions(): boolean;
/**
/**
* Wires up a callback to be invoked when a invocation request is received from the server hub.
*
* @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;
/**
/**
* 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;
/**
/**
* Invokes a server hub method with the given arguments.
*
* @param methodName The name of the server hub method.

View File

@@ -11,4 +11,5 @@ hubProxy.on('message', (message) => {
// connect
connection.start({ jsonp: true })
.done(() => { console.log('Now connected, connection ID=' + connection.id); })
.fail(() => { console.log('Could not connect'); });
.fail(() => { console.log('Could not connect'); });