import { EffectCleanupRegisterFn, Signal } from '@angular/core'; export type Accessor = Signal | (() => T); /** * Makes dependencies of a computation explicit * @param deps list of reactive dependencies or a single reactive dependency * @param fn computation on input; the current previous content(s) of input and the previous value are given as arguments and it returns a new value * @returns an effect function that is passed into `effect`. For example: * * ```typescript * effect(on(a, (v) => console.log(v, b()))); * * // is equivalent to: * effect(() => { * const v = a(); * untracked(() => console.log(v, b())); * }); * ``` */ export declare function on[], U, V = U | undefined>(deps: readonly [...Deps], fn: (input: { -readonly [K in keyof Deps]: Deps[K] extends Accessor ? T : never; }, prevInput: { -readonly [K in keyof Deps]: Deps[K] extends Accessor ? T : never; } | undefined, prevValue: V | undefined, cleanupFn: EffectCleanupRegisterFn) => U, options?: { defer?: boolean; }): (onCleanup: EffectCleanupRegisterFn) => void; export declare function on>, U, V = U | undefined>(deps: Deps, fn: (input: { [K in keyof Deps]: Deps[K] extends Accessor ? T : never; }, prevInput: { [K in keyof Deps]: Deps[K] extends Accessor ? T : never; } | undefined, prevValue: V | undefined, cleanupFn: EffectCleanupRegisterFn) => U, options?: { defer?: boolean; }): (onCleanup: EffectCleanupRegisterFn) => void; export declare function on(deps: Accessor, fn: (input: S, prevInput: S | undefined, prevValue: V | undefined, cleanupFn: EffectCleanupRegisterFn) => U, options?: { defer?: boolean; }): (onCleanup: EffectCleanupRegisterFn) => void;