import type { FeatureDefinition, FeatureDriver, FeatureDriverFactory, FeatureEvaluation, FeatureFlagManagerOptions, FeatureScope, FeatureValue } from './types'; export declare function createFeatureFlags(options?: FeatureFlagManagerOptions): FeatureFlagManager; declare type EvaluationListener = (evaluation: FeatureEvaluation) => void | Promise; export declare class ScopedFeatureFlags { readonly scope: Scope; constructor(manager: FeatureFlagManager, scope: Scope); value(name: string): Promise; values(names: readonly string[]): Promise>; all(): Promise>; active(name: string): Promise; inactive(name: string): Promise; activate(name: string, value?: FeatureValue): Promise; deactivate(name: string): Promise; forget(name: string): Promise; when(name: string, onActive: (value: FeatureValue) => Active | Promise, onInactive?: (value: FeatureValue) => Inactive | Promise): Promise; unless(name: string, onInactive: (value: FeatureValue) => Inactive | Promise, onActive?: (value: FeatureValue) => Active | Promise): Promise; } export declare class FeatureFlagManager { constructor(options?: FeatureFlagManagerOptions); use(driver: FeatureDriver | FeatureDriverFactory): this; missing(behavior: 'false' | 'throw'): this; define(name: string, definition: FeatureDefinition): this; define(definitions: Record): this; define(nameOrDefinitions: string | Record, definition?: FeatureDefinition): this; defined(name: string): boolean; definedNames(): string[]; clearDefinitions(): this; for(scope: Scope): ScopedFeatureFlags; value(name: string, scope?: FeatureScope): Promise; values(names: readonly string[], scope?: FeatureScope): Promise>; all(scope?: FeatureScope): Promise>; active(name: string, scope?: FeatureScope): Promise; inactive(name: string, scope?: FeatureScope): Promise; activate(name: string, value?: FeatureValue, scope?: FeatureScope): Promise; deactivate(name: string, scope?: FeatureScope): Promise; forget(name: string, scope?: FeatureScope): Promise; purge(names?: string | readonly string[]): Promise; flush(): Promise; when(name: string, onActive: (value: FeatureValue) => Active | Promise, onInactive?: (value: FeatureValue) => Inactive | Promise, scope?: FeatureScope): Promise; unless(name: string, onInactive: (value: FeatureValue) => Inactive | Promise, onActive?: (value: FeatureValue) => Active | Promise, scope?: FeatureScope): Promise; onEvaluated(listener: EvaluationListener): () => void; }