import type { Contexts, EvaluationPayload, CollectContextMode } from "./types"; export type LoaderParams = { sdkKey: string; contexts: Contexts; /** Ordered list of API base URLs to try for failover. */ apiUrls?: string[]; /** * Active domain used to derive default apiUrls when `apiUrls` is omitted. * See `InitOptions.domain` for resolution order. */ domain?: string; timeout?: number; collectContextMode?: CollectContextMode; clientVersion?: string; }; export default class Loader { sdkKey: string; contexts: Contexts; apiUrls: string[]; timeout: number; collectContextMode: CollectContextMode; clientVersion: string; abortTimeoutId: ReturnType | undefined; abortController: AbortController | undefined; constructor({ sdkKey, contexts, apiUrls, domain, timeout, collectContextMode, clientVersion, }: LoaderParams); url(apiUrl: string): string; load(): Promise; /** * Try each API URL in order. Return the first successful result. */ private loadWithFailover; private fetchFromUrl; clearAbortTimeout(): void; }