import State from "../state"; import Agile from "../agile"; export default class Computed extends State { agileInstance: () => Agile; computeFunction: () => ComputedValueType; deps: Array; hardCodedDeps: Array; constructor(agileInstance: Agile, computeFunction: () => ComputedValueType, deps?: Array); set value(value: ComputedValueType); get value(): ComputedValueType; /** * Will call the computeFunction and update the dependencies */ recompute(options?: { background?: boolean; sideEffects?: boolean; }): void; /** * Updates the Compute Function */ updateComputeFunction(computeFunction: () => ComputedValueType, deps?: Array, options?: { background?: boolean; sideEffects?: boolean; }): void; /** * @internal * Will add auto tracked dependencies to this and calls the computeFunction */ computeValue(): ComputedValueType; patch(): this; persist(key?: string): this; }