Viktorani API - v0.0.8
    Preparing search index...

    Interface UseGameVisibilityResult

    Return value of useGameVisibility.

    interface UseGameVisibilityResult {
        error: string | null;
        saving: boolean;
        toggle: (key: keyof VisibilityState) => Promise<void>;
        visibility: VisibilityState;
    }
    Index

    Properties

    error: string | null

    Non-null if the last toggle call failed.

    saving: boolean

    true while the DB write is in flight.

    toggle: (key: keyof VisibilityState) => Promise<void>

    Toggle one visibility flag. Persists the change to IndexedDB and broadcasts a VISIBILITY transport event. On failure, reverts the optimistic local update.

    visibility: VisibilityState

    Current visibility state — initialised from the game record.