import { PureObject, PurePtr } from '@pure-ptr/core'; /** * Create a pointer to a local component state. * * @param {S | (() => S)} initialState - The initial state value or a function that returns the initial state. * @returns {PurePtr} PurePtr containing the state value and the state setter function. */ export declare function useStatePtr(initialState: S | (() => S)): PurePtr; /** * Use immutable class instance as local component state. * * @template C - The type of the immutable class. * @param ImmutableClass - The constructor of the immutable class. * @returns A `PurePtr` instance that contains the state and a setter function. */ export declare function useClassPtr(ImmutableClass: new () => C): PurePtr; /** * Create a pointer to the local state that is synchronized with another * value or pointer in a single direction. When the source changes, the linked state changes too. * * If the source is an instance of `PurePtr`, it uses the value of the pointer. * Otherwise, it uses the source value directly. * * @template T - The type of the value. * @param {T | PurePtr} source - The source value or pointer. * @returns {PurePtr} - A linked state pointer. */ export declare function useLinkedStatePtr(source: T | PurePtr): PurePtr; /** * Create a pointer to a local storage. * * @param {string} key - The key under which the state is stored in session storage. * @param {S | (() => S)} initialState - The initial state or a function that returns the initial state. * @returns {ReturnType>} A state pointer that is synchronized with session storage. */ export declare function useLocalStoragePtr(key: string, initialState: S | (() => S)): PurePtr; /** * Create a pointer to a session storage. * * @param {string} key - The key under which the state is stored in session storage. * @param {S | (() => S)} initialState - The initial state or a function that returns the initial state. * @returns {ReturnType>} A state pointer that is synchronized with session storage. */ export declare function useSessionStoragePtr(key: string, initialState: S | (() => S)): PurePtr; //# sourceMappingURL=state-hooks.d.ts.map