import type { Accessor, ObserverCallback, ReadableSignal } from './internals/types.js'; import { effect, effectScope, deferScope } from './internals/system.js'; export { effect, effectScope, deferScope }; /** * Subscribe to accessor changes. * Callback will be called immediately. * Will trigger accessor mount if applicable. * @param $accessor - The accessor to subscribe to. * @param fn - The callback to call on value change. * @param noDefer - Ignore subscription defer. * @returns A function to stop the subscription. */ export declare function subscribe($accessor: Accessor, fn: ObserverCallback, noDefer?: boolean): import("./internals/types.js").Destroy; /** * Listen accessor changes. * Callback will be called only on value change, without initial call. * Will trigger accessor mount if applicable. * @param $accessor - The accessor to subscribe to. * @param fn - The callback to call on value change. * @param noDefer - Ignore subscription defer. * @returns A function to stop the subscription. */ export declare function listen($accessor: Accessor, fn: ObserverCallback, noDefer?: boolean): import("./internals/types.js").Destroy; /** * Observe accessor changes. * Callback will be called only on value change, without initial call. * Will not trigger accessor mount. * @param $accessor - The accessor to subscribe to. * @param fn - The callback to call on value change. * @param noDefer - Ignore subscription defer. * @returns A function to stop the subscription. */ export declare function observe($accessor: ReadableSignal, fn: ObserverCallback, noDefer?: boolean): import("./internals/types.js").Destroy; //# sourceMappingURL=effect.d.ts.map