IFClite TypeScript API
    Preparing search index...

    Interface ConflictUIBridge

    interface ConflictUIBridge {
        acceptTheirs(key: string): Promise<boolean>;
        active(): ConflictBucket[];
        destroy(): void;
        keepMine(key: string): Promise<boolean>;
        on(listener: BridgeListener): () => void;
        onAcceptTheirs(kind: ConflictKind, action: ResolutionAction): () => void;
        onKeepMine(kind: ConflictKind, action: ResolutionAction): () => void;
        resolve(key: string): boolean;
    }
    Index
    • Same shape as keepMine, but for "accept theirs".

      Parameters

      • key: string

      Returns Promise<boolean>

    • Returns void

    • Run the registered "keep mine" callback (if any) and close the bucket. Apps register the callback per kind via onKeepMine. The callback is responsible for emitting the follow-up CRDT edit that re-asserts the local user's value.

      Parameters

      • key: string

      Returns Promise<boolean>

    • Subscribe to bucket lifecycle (open / update / close).

      Parameters

      Returns () => void

    • Mark a bucket resolved (close immediately). Useful when the UI dispatches a "keep mine" edit and wants the badge to disappear.

      Parameters

      • key: string

      Returns boolean