import { useRGSWithPlugins } from "./utils"; import type { Plugin, SetStateAction } from "./utils"; /** * Creates a store with plugins. * @example * * ```tsx * // in hook file, e.g., store.ts * export const useMyRGS = create(key, value, plugins); * * // in component file * const [state, setState] = useMyRGS(); * ``` * * @param key - Unique key to identify the store. * @param value - Initial value of the store. * @param plugins - Plugins to be applied to the store. * @returns - A hook function that returns a tuple (Ordered sequence of values) containing the state and a function to set the state. */ export declare const create: (key: string, value?: T, plugins?: Plugin[]) => (() => [T, SetStateAction]); /** * Creates a hook similar to useRGS, but with plugins to be applied on first invocation. * * @param plugins - Plugins to be applied to the store. * @returns A hook that automatically initializes the store (if not already initialized) with the given plugins. */ export declare const withPlugins: (plugins: Plugin[]) => ((key: string, value?: U, doNotInit?: boolean) => [U, SetStateAction]); export { useRGSWithPlugins };