import { Signal } from "signal-polyfill"; //#region src/core/signals/primitives.d.ts /** Read a signal value without tracking it as a dependency. */ declare const untrack: (fn: () => T) => T; /** A writable reactive value (read + write). */ type Signal$1 = Signal.State; /** A derived reactive value that re-evaluates when its dependencies change (read-only). */ type Computed = Signal.Computed; /** A read-only view of a reactive value. */ type ReadonlySignal = Omit, 'set'>; interface SignalOptions { equals?: (t: T, t2: T) => boolean; } /** Create a writable reactive value. */ declare function signal(initialValue: T, options?: SignalOptions): Signal$1; /** Create a computed reactive value. */ declare function computed(fn: () => T, options?: SignalOptions): Computed; /** * Update a writable signal. Two forms: * * - **Updater function** `(current) => next`. Works for any signal type, * including `Signal` — handle undefined in the updater. * - **Partial object** to merge into the current state. Requires * `T extends object`. * * @example * update(state, { playbackRate: 2 }); * update(state, (s) => ({ ...s, count: s.count + 1 })); * update(maybeUndefinedSignal, (current) => current ?? defaultValue); */ declare function update(signal: Signal$1, updater: (current: T) => T): void; declare function update(signal: Signal$1, updater: Partial): void; /** * Read every signal in a map and return a plain object snapshot. Each read * tracks in the surrounding Computed/Effect — equivalent to calling `.get()` * on a single `Signal` over the merged shape. * * Convenience for behaviors that pass whole state/context snapshots to pure * helpers; prefer per-field reads when only a few fields are needed. */ declare function snapshot>>(map: M): { [K in keyof M]: M[K] extends { get(): infer V; } ? V : never; }; //#endregion export { Computed, ReadonlySignal, Signal$1 as Signal, SignalOptions, computed, signal, snapshot, untrack, update }; //# sourceMappingURL=primitives.d.ts.map