mise API - v0.0.0
    Preparing search index...

    Function listPages_walk

    • Walks every page of a paginated CUBE list, yielding one step per page.

      This is the one pagination loop: it owns offset advancement, total latching, and termination, so callers only consume rows. The walk ends when a page comes back empty, when the latched total has been reached, or when a short page arrives while the total is still unknown. Fetch errors propagate to the caller; a resumed walk continues from startOffset.

      Type Parameters

      • T

      Parameters

      • page_fetch: (offset: number, limit: number) => Promise<ListPage<T>>

        Fetches one page at the given offset and limit.

      • options: PageWalkOptions = {}

        Page size and resume position. See PageWalkOptions.

      Returns AsyncGenerator<PageWalkStep<T>, void, void>

      Async generator yielding a PageWalkStep per fetched page.

      for await (const step of listPages_walk((offset, limit) =>
      feedsPage_get(client, { limit, offset }))) {
      for (const feed of step.items) index.set(feed.id, feed);
      }