UNPKG

@tanstack/db

Version:

A reactive client store for building super fast apps on sync

21 lines (20 loc) 751 B
import { CollectionSubscription } from '../../collection/subscription.js'; import { LazyDemandPlan } from '../compiler/joins.js'; export type DemandUpdate = { changed: boolean; empty: boolean; ready: Promise<Array<unknown>> | true; }; /** * Keeps lazy subset requests aligned with the current relation of demanded * keys. Additions load only new coverage. Removals release and rebuild only * request segments that covered a removed key. */ export declare class SubsetDemandController { private readonly states; private readonly warnedPlans; private valueIdentity; setDemand(subscription: CollectionSubscription, plan: LazyDemandPlan, keys: Set<unknown>): DemandUpdate; clear(): void; private warnUnoptimized; }