import { CreateComputedOptions, type Signal } from '@angular/core'; /** * Creates a computed signal that tracks the previous value produced by the given computation. * * The first time the computed signal is evaluated, the returned signal emits the same value * as the current computation result. On subsequent evaluations, it emits the value from the prior update. * * @example * ```ts * const value = signal(0); * const previous = computedPrevious(value); * * effect(() => { * console.log('Current value:', value()); * console.log('Previous value:', previous()); * }); * * // Logs initially: * // Current value: 0 * // Previous value: 0 * * value.set(1); * * // Logs: * // Current value: 1 * // Previous value: 0 * * value.set(2); * * // Logs: * // Current value: 2 * // Previous value: 1 * ``` * * @param computation A function that returns the current value. Typically, this is a signal accessor. * @param options Optional computed signal configuration. * @returns A signal that emits the previous value returned by the computation. */ export declare function computedPrevious(computation: () => T, options?: CreateComputedOptions): Signal;