/** * Page-scoped freshness registry: what the data pieces of one page report about * how old their data is, so a page header can show one «Datos al…» stamp. * Pure TypeScript, memory only: it holds piece keys and two timestamps, never * rows, urls or tokens, and nothing is persisted or logged. */ /** Epoch milliseconds of the oldest and newest data a response was built from. */ export type DataAsOf = { oldest: number; newest: number; }; export type FreshnessState = { status: 'loading'; } | { status: 'settled'; dataAsOf: DataAsOf | null; }; /** An immutable view of the registry: a new object after every change. */ export type FreshnessSnapshot = Readonly>; export type FreshnessRegistry = { report: (pieceKey: string, state: FreshnessState) => void; remove: (pieceKey: string) => void; /** The listener runs on change only. Returns the unsubscribe function. */ subscribe: (listener: () => void) => () => void; snapshot: () => FreshnessSnapshot; }; export declare const createFreshnessRegistry: () => FreshnessRegistry;