export interface ListIteratorOptions { readonly delay?: number | undefined; readonly loop?: boolean | undefined; } export type NextOptions = ListIteratorOptions; type GetNextOptions = Pick; export interface ListIterator { readonly next: (options?: NextOptions) => Promise; readonly back: () => Promise; readonly isCanNext: (options?: GetNextOptions) => Promise; readonly isCanBack: (options?: GetNextOptions) => Promise; /** Pending for next */ readonly isPending: boolean; /** Cancel the delayed switch. */ readonly cancel: VoidFunction; } export interface ListScope { readonly getCurrentIndex: () => number | Promise; readonly getSize: () => number | Promise; } export declare function getListIterator(scope: ListScope, onSwitch: (nextIndex: number) => unknown, options?: ListIteratorOptions): ListIterator; export {};