import { ReadonlySignal, Signal } from "@preact-signals/unified-signals"; import { Context } from "react"; import { AnyReactive, GetValue, reducerSignal } from "../utils"; /** * Allows to create signal function which is called only once, without dependencies tracking */ export declare const useInitSignal: (init: () => T) => Signal; /** * Creates computed which will subscribe tp reactive value */ export declare const useSignalOfReactive: (reactive: T) => ReadonlySignal>; /** * * Creates signal which state is always equal to state passed to hook */ export declare const useSignalOfState: (state: T) => ReadonlySignal; /** * * @param context * @returns signal of context value */ export declare const useSignalContext: (context: Context) => ReadonlySignal; export type Dispose = () => void; /** * * Creates effect with with first provided function */ export declare const useSignalEffectOnce: (_effect: () => void | Dispose) => void; /** * * Hook wrapper for {@link reducerSignal} */ export declare const useReducerSignal: typeof reducerSignal;