UNPKG

react-enable

Version:

feature flags to enable and disable functionality at runtime in a react application

13 lines (12 loc) 535 B
/// <reference types="react" /> import { FeaturesDispatch, FeaturesState } from './FeaturesState'; import { FeatureDescription, FeatureValue } from './FeatureState'; export declare const FeatureContext: import("react").Context<FeatureContextType | null>; export interface FeatureContextType { overridesSend: FeaturesDispatch; defaultsSend: FeaturesDispatch; featuresDescription: readonly FeatureDescription[]; overridesState: FeaturesState; defaultsState: FeaturesState; test: (flag: string) => FeatureValue; }