UNPKG

toggles

Version:

A collection of React hooks for toggles with dynamic noun and verb APIs

18 lines (17 loc) 525 B
import { Noun } from './nouns'; export declare class GlobalNounStore { private toggles; private cleanupInterval; private readonly TTL; constructor(); private startCleanupTimer; private cleanup; get(name: string, initialValue?: boolean): Noun; acquire(name: string): void; release(name: string): void; subscribe(name: string, callback: () => void): () => void; clear(): void; destroy(): void; has(name: string): boolean; } export declare const globalNouns: GlobalNounStore;