@dxos/echo
    Preparing search index...

    Function setRetention

    • Sets the feed's retention options on the feed object, in one change.

      Fails with the schema error, leaving the object unchanged, when maxLength is not an integer of at least 1 or maxAge is not a positive, finite duration. Returns once the change is applied locally; the store trims on its own index pass, which may run on another device.

      Parameters

      Returns Effect<void, SchemaError>

      yield* Feed.setRetention(feed, { maxLength: 1000, maxAge: Duration.days(7) });
      

      O(1); one object change.