UNPKG

@harnessio/ff-javascript-client-sdk

Version:

Basic library for integrating CF into javascript applications.

30 lines (29 loc) 1.04 kB
import { type Options, StreamEvent } from './types'; import type Poller from './poller'; import type { Emitter } from 'mitt'; export declare class Streamer { private eventBus; private configurations; private url; private apiKey; private standardHeaders; private fallbackPoller; private logDebug; private logError; private eventCallback; private maxRetries; private xhr; private closed; private readTimeoutCheckerId; private connectionOpened; private disconnectEventEmitted; private reconnectAttempts; private retriesExhausted; constructor(eventBus: Emitter, configurations: Options, url: string, apiKey: string, standardHeaders: Record<string, string>, fallbackPoller: Poller, logDebug: (...data: any[]) => void, logError: (...data: any[]) => void, eventCallback: (e: StreamEvent) => void, maxRetries: number); start(): void; close(): void; private fallBackToPolling; private stopFallBackPolling; private logDebugMessage; private logErrorMessage; }