1.5.37 • Published 6 months ago

@types/angular-signalr-hub v1.5.37

Weekly downloads
271
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for angular-signalr-hub v1.5.0
// Project: https://github.com/JustMaier/angular-signalr-hub
// Definitions by: Adam Santaniello <https://github.com/AdamSantaniello>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <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?: Array<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

Credits

These definitions were written by Adam Santaniello.

1.5.34

8 months ago

1.5.36

6 months ago

1.5.35

7 months ago

1.5.37

6 months ago

1.5.33

3 years ago

1.5.32

7 years ago

1.5.31

8 years ago

1.5.30

8 years ago

1.5.29

8 years ago

1.5.28-alpha

8 years ago

1.5.26-alpha

8 years ago

1.5.25-alpha

8 years ago

1.5.24-alpha

8 years ago

1.5.23-alpha

8 years ago

1.5.22-alpha

8 years ago

1.5.21-alpha

8 years ago

1.5.16-alpha

8 years ago

1.5.15-alpha

8 years ago