import { BaseSubContext } from "./context"; import { IRef, ISource, Params, SubFn, Subscription } from "./model"; export declare class Reference extends BaseSubContext implements IRef, ISource { private pullValue; private args; name: string | undefined; onNoSubscribers: (() => void) | null; private lastValue; private subscribers; constructor(pullValue: SubFn, args: P); deref(): V; onDependenciesChanged(): void; subscribe(onChange: (v: V) => any): void; unsubscribe(onChange: (v: V) => any): void; toString(): string; protected forceDeref(): V; private tryInvalidate; } /** * Declare a subscription that computes its value using the given function. The * returned value is a function that can be invoked with the same parameters as * `fn` and returns an `IRef` for the value returned by your `fn`. */ export declare function sub(fn: SubFn): Subscription;