/** * Router Revalidation Logic * * Evaluates whether segments should revalidate based on params, actions, and custom functions. */ import type { ResolvedSegment, HandlerContext } from "../types"; import type { ActionContext } from "./types"; /** * Options for revalidation evaluation */ interface EvaluateRevalidationOptions { /** Current segment to evaluate */ segment: ResolvedSegment; /** Previous route params (from route match, not segment) */ prevParams: Record; /** Lazy function to get previous segment if needed */ getPrevSegment: (() => Promise) | null; /** Current request */ request: Request; /** Previous URL */ prevUrl: URL; /** Next URL */ nextUrl: URL; /** Custom revalidation functions */ revalidations: Array<{ name: string; fn: any; }>; /** Current route key */ routeKey: string; /** Handler context */ context: HandlerContext; /** Action context if triggered by action */ actionContext?: ActionContext; /** If true, this is a stale cache revalidation request */ stale?: boolean; } /** * Evaluate if a segment should revalidate using soft/hard decision pattern * Optimized to use prevParams directly and avoid building previous segments */ export declare function evaluateRevalidation(options: EvaluateRevalidationOptions): Promise; export {}; //# sourceMappingURL=revalidation.d.ts.map