UNPKG

@harnessio/ff-javascript-client-sdk

Version:

Basic library for integrating CF into javascript applications.

32 lines (31 loc) 1.2 kB
import { APIRequestMiddleware, 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 middleware?; 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, middleware?: APIRequestMiddleware); registerAPIRequestMiddleware(middleware: APIRequestMiddleware): void; start(): void; close(): void; private fallBackToPolling; private stopFallBackPolling; private logDebugMessage; private logErrorMessage; }