Installation
npm install --save @types/angular-signalr-hub
Summary
This package contains type definitions for angular-signalr-hub (https://github.com/JustMaier/angular-signalr-hub).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angular-signalr-hub.
index.d.ts
/// <reference types="signalr" />
/// <reference types="angular" />
declare module "angular-signalr-hub" {
let _: string;
export = _;
}
declare namespace ngSignalr {
interface HubFactory {
/**
* Creates a new Hub connection
*/
new(hubName: string, options: HubOptions): Hub;
}
class Hub {
hubName: string;
connection: SignalR.Connection;
proxy: SignalR.Hub.Proxy;
on(event: string, fn: (...args: any[]) => void): void;
invoke(method: string, ...args: any[]): JQueryDeferred<any>;
disconnect(): void;
connect(): JQueryPromise<any>;
}
interface HubOptions {
/**
* Collection of client side callbacks
*/
listeners?: { [index: string]: (...args: any[]) => void } | undefined;
/**
* String array of server side methods which the client can call
*/
methods?: string[] | undefined;
/**
* Sets the root path for the SignalR web service
*/
rootPath?: string | undefined;
/**
* Object representing additional query params to be sent on connection
*/
queryParams?: { [index: string]: string } | undefined;
/**
* Function to handle hub connection errors
*/
errorHandler?: ((error: string) => void) | undefined;
/**
* Enable/disable logging
*/
logging?: boolean | undefined;
/**
* Use a shared global connection or create a new one just for this hub, defaults to true
*/
useSharedConnection?: boolean | undefined;
/**
* Sets transport method (e.g 'longPolling' or ['webSockets', 'longPolling'] )
*/
transport?: any;
/**
* Function to handle hub connection state changed event
*/
stateChanged?: ((state: SignalR.StateChanged) => void) | undefined;
}
}
Additional Details
- Last updated: Mon, 20 Nov 2023 23:36:23 GMT
- Dependencies: @types/angular, @types/signalr
Credits
These definitions were written by Adam Santaniello.