/** * TC39 Signals Polyfill for XMachines Play Architecture * * Provides fine-grained reactive state primitives based on the TC39 Signals proposal (Stage 1). * This package isolates the TC39 polyfill to protect the codebase from Stage 1 API changes. * * **Architectural Context:** Implements **Signal-Only Reactivity (INV-05)** by providing * the reactive primitives that enable Actor-to-Infrastructure communication without * subscriptions or event emitters. All state propagation in Play Architecture uses * TC39 Signals for automatic dependency tracking and glitch-free updates. * * @packageDocumentation * @module @xmachines/play-signals * * @example * Basic Signal usage * ```typescript * import { Signal } from "@xmachines/play-signals"; * * // Create state signal * const count = new Signal.State(0); * * // Create computed signal * const doubled = new Signal.Computed(() => count.get() * 2); * * // Observe changes * const watcher = new Signal.subtle.Watcher(() => { * console.log('Count:', count.get(), 'Doubled:', doubled.get()); * }); * watcher.watch(count); * * count.set(5); // Logs: Count: 5 Doubled: 10 * ``` * * @see [Play RFC](../../docs/rfc/play.md) - Invariant INV-05 * @see {@link https://github.com/tc39/proposal-signals | TC39 Signals Proposal} * * @remarks * **Stage 1 Status:** TC39 Signals is currently Stage 1 in the TC39 process. This package * uses the official `signal-polyfill` reference implementation to isolate the codebase * from potential API changes as the proposal evolves. All signal imports should go through * this package to maintain isolation. * * **Why Isolation:** By re-exporting the polyfill through this dedicated package, we can * update the polyfill version or adapt to API changes in one place without touching * consuming packages. This architectural decision protects against Stage 1 API churn. */ export { Signal } from "signal-polyfill"; export { watchSignal } from "./watch-signal.js"; export type { SignalState, SignalComputed, SignalWatcher, SignalOptions, ComputedOptions, WatcherNotify, } from "./types.js"; //# sourceMappingURL=index.d.ts.map