UNPKG

react-unleash-flags

Version:

React component for Unleash or Gitlab Feature Flags

33 lines (32 loc) 746 B
export declare type FlagsConfig = { appName: string; instanceId: string; host?: string; url?: string; uri?: string; extraHttpHeaders?: { [key: string]: string; }; }; export declare type FlagValue = { description: string; enabled: boolean; name: string; strategies: { name: string; parameters: { [key: string]: string | number | boolean; }; }[]; }; declare class FlagsClient { config: FlagsConfig; private flags; constructor(config: FlagsConfig); init(): Promise<void>; getFlags(): FlagValue[]; getFlag(flagName: string): FlagValue | undefined; private fetchFlags; private checkValidInstance; } export default FlagsClient;