import { Fetcher, ModulatorFactory, Manager } from "../fetcher/index.js"; import { Condition } from "../condition/index.js"; import type { FetchedPage, Notifier } from "../fetcher/index.js"; import type { StrategyEvents } from "./index.js"; export declare class UnorderedStrategy { private manager; private fetcher; private notifier; private fetchNotifier; private memberNotifier; private modulator; private polling; private pollInterval?; private canceled; private isEnding; private shouldEndAgain; processing: Promise; private logger; constructor(memberManager: Manager, fetcher: Fetcher, notifier: Notifier, modulatorFactory: ModulatorFactory, polling: boolean, pollInterval?: number); start(url: string, condition: Condition, root?: FetchedPage): Promise; cancel(): Promise; private handleFetched; /** * This function implements the logic of a synchronized ending loop that uses * the @isEnding and @shouldEndAgain flags to prevent multiple ending loops from running at the same time. * When a process is already running, subsequent calls simply set the shouldEndAgain flag and return. * The original process then picks up these pending requests in its loop, * ensuring sequential execution without overlapping asynchronous operations */ private checkEnd; private _checkEnd; }