import { f as Computed } from "../children-s3nFjpLA.mjs"; //#region src/integrations/react.d.ts /** * Subscribe to any readable signal — writable or computed — returning its current value. * * Accepts any zero-argument callable `() => T`, which includes both `Signal` and * `Computed`. Using `() => T` instead of `Computed` prevents TypeScript from * picking the write overload of `Signal` during type inference. * * @template T - The type of the signal value. * @param value - A writable `Signal` or a derived `Computed`. * @returns The current value, updated on every signal change. * * @example * ```tsx * const count = signal(0); * const double = computed(() => count() * 2); * * function Display() { * const countValue = useSignal(count); * const doubleValue = useSignal(double); * return
{countValue} × 2 = {doubleValue}
; * } * ``` */ declare function useSignal(value: () => T): T; /** * Create a signal effect scope tied to a React component's lifetime. * * All effects registered inside `callback` are grouped into a single scope. The scope — and every effect within it — is automatically stopped when the component unmounts. * * If your callback returns a `Computed` signal, the hook will always return its current value, updating reactively as dependencies change. If your callback returns `void`, the value will be `undefined`. * * Returns the current value of the computed signal (or `undefined`). * * Use this when you want to create multiple related effects at once without individually managing each one's lifecycle. All effects and cleanups inside the callback are automatically cleaned up on unmount. * * @template T - The type of the computed value (if any). * @param callback - A function that registers one or more signal effects, optionally returning a `Computed`. * @returns `value` — the current value of the computed signal (or `undefined`). * * @example * ```tsx * function Analytics() { * useScope(() => { * effect(() => console.log("page:", currentPage())); * effect(() => console.log("user:", currentUser())); * }); * return null; * } * * // With computed value: * function DoubleCounter() { * const double = useScope(() => computed(() => count() * 2)); * return
{double}
; * } * ``` */ declare function useScope(callback: () => Computed | void): T | void; //#endregion export { useScope, useSignal };