import type { Computation } from "./Computation.ts"; /** * Reactive producer node that can be tracked by computations. * * Plain signals only expose a version. Memos additionally provide a refresh hook that can bring their cached value up to date on demand. */ export declare class Producer { #private; /** * Creates a producer with optional lazy refresh support. * * @param refresh - Optional callback that refreshes the producer lazily. */ constructor(refresh?: () => void); /** * Marks all subscribed computations as dirty. */ invalidateSubscribers(): void; /** * Bumps the producer version and dirties all subscribed computations. */ change(): void; /** * Returns the current producer version. * * @returns The current version counter. */ getVersion(): number; /** * Refreshes the producer if it supports lazy recomputation. */ refresh(): void; /** * Subscribes a computation to future invalidations of this producer. * * @param subscriber - The computation to subscribe. */ subscribe(subscriber: Computation): void; /** * Removes a computation from future invalidations of this producer. * * @param subscriber - The computation to unsubscribe. */ unsubscribe(subscriber: Computation): void; }