import type { ReactiveNode, SignalNode, ComputedNode, AnySignal, WritableSignal, ReadableSignal, EffectCallback, Destroy, Compute, NewValue, Morph } from './types.js'; /** * Run a function without tracking dependencies. * @param fn * @returns The result of the function. */ export declare function untracked(fn: () => T): T; export declare function pushActiveSub(sub?: ReactiveNode): ReactiveNode | undefined; export declare function popActiveSub(prevSub?: ReactiveNode): void; export declare function batch(fn: () => T): T; export declare function onSignal(callback: ($signal: AnySignal) => void): void; export declare function createSignal(constructor: (value?: unknown) => unknown, node: ComputedNode | SignalNode, ctx?: ComputedNode | SignalNode | Morph): AnySignal; /** * Create a signal with atomic value. * @returns A signal. */ export declare function signal(): WritableSignal; /** * Create a signal with initial atomic value * @param value - Initial value of the signal. * @returns A signal. */ export declare function signal(value: T): WritableSignal; /** * Create a signal that reactivly computes its value from other signals. * @param compute - The function to compute the value. * @returns A signal. */ export declare function computed(compute: Compute): ReadableSignal; /** * Run effect function and re-run it on dependency change. * @param fn - The effect function to run. * @param noDefer - Ignore effect deferring. * @returns A function to stop the effect. */ export declare function effect(fn: EffectCallback, noDefer?: boolean): Destroy; /** * Run effect scope function to group effects. * @param fn - The effect scope function to run. * @returns A function to stop child effects. */ export declare function effectScope(fn: () => void): Destroy; /** * Defer scope creation to delay its effects execution. * @param fn - The deferred scope function to run. * @returns A function to start effects. */ export declare function deferScope(fn: () => void): () => Destroy; /** * Manually trigger signals update propagation. * @param fn - Function with signal reads to trigger. */ export declare function trigger(fn: () => void): void; export declare function nextValue(prevValue: T, nextValue: NewValue): T; export declare function signalNextValue($signal: WritableSignal, newValue: NewValue): T; //# sourceMappingURL=system.d.ts.map