/** * A signal is a value that can be subscribed to and notified when it changes. * @template T */ export class Signal extends Set { /** * Create a signal with the given value. * @param {T} value */ constructor(value: T); set value(value: T); /** * @type {T} */ get value(): T; /** * Return the value without subscribing. * @returns {T} */ peek(): T; valueOf(): T; #private; } export function signal(value: T): Signal; /** * A computed signal is a read-only signal that is computed from other signals. * @template T */ export class Computed extends Signal { /** * A computed signal is a signal that is computed from other signals. * @param {() => T} value */ constructor(value: () => T, fx?: boolean); /** * @type {T} */ get value(): T; /** * Return the value without subscribing. * @returns {T} */ peek(): T; #private; } export function computed(value: () => T): Computed; export function effect(callback: fx): cleanup; export function batch(callback: () => void): void; export function untracked(callback: () => T): T; export type cleanup = (() => void) | null | undefined; export type fx = () => cleanup;