UNPKG

@triniwiz/nativescript-socketio

Version:
34 lines (33 loc) 1.22 kB
import { InjectionToken, ModuleWithProviders } from '@angular/core'; import { SocketIO } from '@triniwiz/nativescript-socketio'; import * as i0 from "@angular/core"; export interface IOOptions { compress?: boolean; debug?: boolean; query?: { [key: string]: any; }; cookie?: string[]; extraHeaders?: { [key: string]: any; }; forceNew?: boolean; forcePolling?: boolean; forceWebsockets?: boolean; log?: boolean; path?: string; reconnects?: boolean; reconnectAttempts?: number; reconnectWait?: number; secure?: boolean; } export type SocketIOOptions = Partial<IOOptions>; export declare const SOCKETIO_URL: InjectionToken<string>; export declare const SOCKETIO_OPTIONS: InjectionToken<Partial<IOOptions>>; export declare function socketIOFactory(url: string, options: SocketIOOptions): SocketIO; export declare class SocketIOModule { static forRoot(url: string, options?: SocketIOOptions): ModuleWithProviders<SocketIOModule>; static ɵfac: i0.ɵɵFactoryDeclaration<SocketIOModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<SocketIOModule, never, never, never>; static ɵinj: i0.ɵɵInjectorDeclaration<SocketIOModule>; }