UNPKG

@flags-sdk/flagsmith

Version:

Flagsmith provider for the Flags SDK

21 lines (17 loc) 820 B
import { ProviderData, Adapter } from 'flags'; import { IFlagsmithFeature, IIdentity } from 'flagsmith/types'; export { IIdentity } from 'flagsmith/types'; declare function getProviderData(options: { environmentKey: string; projectId: string; }): Promise<ProviderData>; type FlagsmithValue = IFlagsmithFeature['value']; type EntitiesType = IIdentity; type AdapterResponse = { booleanValue: () => Adapter<boolean, EntitiesType>; stringValue: () => Adapter<string, EntitiesType>; numberValue: () => Adapter<number, EntitiesType>; }; declare const getOrCreateDefaultFlagsmithAdapter: () => AdapterResponse; declare const flagsmithAdapter: AdapterResponse; export { type AdapterResponse, type EntitiesType, type FlagsmithValue, flagsmithAdapter, getOrCreateDefaultFlagsmithAdapter, getProviderData };