@maschinenlesbar.org/openka-cli
    Preparing search index...

    Function withDiscoveryState

    • Rebuild a DiscoverResult around new refs, carrying the discovery bookkeeping across unchanged.

      Every adapter that wraps another one ends the same way, and five of them wrote this out by hand — Niedersachsen had already extracted it privately, which is how you can tell the abstraction was wanted. Adding one optional field to DiscoverResult meant five edits, and forgetting one would have dropped that field for that Land silently.

      Note what this does not do: it never re-applies applyWindow. The wrapped adapter has already filtered to the window, and filtering twice on a ref whose date the wrapper enriched would quietly change which records a sync returns.

      Parameters

      Returns DiscoverResult