import { ContinuationToken, type CursorResult } from '..'; export declare class KeyedCursorDataLoader { private _loaders; private _loaded; private _pending; private _loadPage; private _loadWithFirstPage; private _resumeAfterFailure; constructor(init: { loadPage: (key: string, continuationToken: ContinuationToken) => Promise | null>; /** Started with the key's first page — never with `loadMore` — and awaited by `ensureLoaded`; its outcome never reaches `isLoaded`. */ loadWithFirstPage?: (key: string) => Promise; /** Keep a key's cursor when its page fails, so the next `loadMore` for it retries instead of ending that key's list for good. @default false */ resumeAfterFailure?: boolean; }); items: (key?: string) => T[]; loading: (key?: string) => boolean; initialLoading: (key?: string) => boolean; /** The key's last attempt did not deliver a page, whether it returned nothing or threw; cleared when the next attempt for that key starts. */ failed: (key?: string) => boolean; /** More pages are reachable for the key. Goes false on a failed page unless the loader was built with `resumeAfterFailure`. */ canLoadMore: (key?: string) => boolean; /** False until the key's first page loaded without failing, so a failed load can be retried; a later failed page never clears it. */ isLoaded: (key?: string) => boolean; /** Loads the key's first page once; concurrent and repeat calls share that load's promise. */ ensureLoaded: (key?: string) => Promise; loadMore: (key?: string) => Promise; /** Drops the key's pages and loads them again from the first one. */ reload: (key?: string) => Promise; private startLoad; private runLoad; private runSideLoad; private loaderFor; }