import { Configuration } from './config.js'; import { I as Input, O as Outcome, F as Flags, a as FlagUser, T as Traits, d as InitialFlagState, e as FlagBag } from './types-06e22b20.js'; export { e as FlagBag, a as FlagUser, F as Flags, d as InitialFlagState, I as Input, O as Outcome, T as Traits } from './types-06e22b20.js'; import 'cookie'; declare class ObjectMap { keys: Key[]; values: Value[]; constructor(); private _getIndex; set(key: Key, value: Value): void; get(key: Key): ReturnValue | null; /** Resets the cache. For testing purposes. */ clear(): void; } declare const cache: ObjectMap>; interface FactoryUseFlagOptions { /** * By default `@happykit/flags` refetches the feature flags when the window * regains focus. You can disable this by passing `revalidateOnFocus: false`. */ revalidateOnFocus?: boolean; /** * A timeout in milliseconds after which any client-side evaluation requests * from `useFlags` will be aborted. * * Pass `false` to disable this feature. * * This feature is only supported in [browsers which support](https://caniuse.com/abortcontroller) the [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). */ clientLoadingTimeout?: number; } declare type UseFlagsOptions = ({ user?: FlagUser | null; traits?: Traits | null; initialState?: InitialFlagState; pause?: boolean; } & FactoryUseFlagOptions) | undefined; /** * Creates a useFlags() function your application should use when loading flags on the client. */ declare function createUseFlags(configuration: Configuration, { revalidateOnFocus: factoryRevalidateOnFocus, clientLoadingTimeout: factoryClientLoadingOptions, }?: FactoryUseFlagOptions): (options?: UseFlagsOptions) => FlagBag; export { UseFlagsOptions, cache, createUseFlags };