interface ConfidenceRecalculationLoopOptions {
    onMatchProcessed?: (
        context: ConfidenceRecalculationMatchContext,
    ) => void | Promise<void>;
    shouldContinue?: () => boolean;
    yieldEvery?: number;
    logPrefix?: string;
    logger?: (message: string, error: unknown) => void;
}

Properties

onMatchProcessed?: (
    context: ConfidenceRecalculationMatchContext,
) => void | Promise<void>

Callback invoked after each match is recalculated.

shouldContinue?: () => boolean

Return false to abort before processing the next match.

yieldEvery?: number

How frequently to yield back to the event loop (default: 50).

logPrefix?: string

Optional prefix inserted before error logging.

logger?: (message: string, error: unknown) => void

Logger used when recalculation fails for a candidate.