import * as Atom from "@effect-atom/atom/Atom"; import type * as AtomRef from "@effect-atom/atom/AtomRef"; import type * as Result from "@effect-atom/atom/Result"; import * as Exit from "effect/Exit"; /** * @since 1.0.0 * @category hooks */ export declare const useAtomInitialValues: (initialValues: Iterable, any]>) => void; /** * @since 1.0.0 * @category hooks */ export declare const useAtomValue: { (atom: Atom.Atom): A; (atom: Atom.Atom, f: (_: A) => B): B; }; /** * @since 1.0.0 * @category hooks */ export declare const useAtomMount: (atom: Atom.Atom) => void; /** * @since 1.0.0 * @category hooks */ export declare const useAtomSet: (atom: Atom.Writable, options?: { readonly mode?: ([R] extends [Result.Result] ? Mode : "value") | undefined; }) => "promise" extends Mode ? ((value: W) => Promise>) : "promiseExit" extends Mode ? ((value: W) => Promise, Result.Result.Failure>>) : ((value: W | ((value: R) => W)) => void); /** * @since 1.0.0 * @category hooks */ export declare const useAtomRefresh: (atom: Atom.Atom) => () => void; /** * @since 1.0.0 * @category hooks */ export declare const useAtom: (atom: Atom.Writable, options?: { readonly mode?: ([R] extends [Result.Result] ? Mode : "value") | undefined; }) => readonly [value: R, write: "promise" extends Mode ? ((value: W) => Promise>) : "promiseExit" extends Mode ? ((value: W) => Promise, Result.Result.Failure>>) : ((value: W | ((value: R) => W)) => void)]; /** * @since 1.0.0 * @category hooks */ export declare const useAtomSuspense: (atom: Atom.Atom>, options?: { readonly suspendOnWaiting?: boolean | undefined; readonly includeFailure?: IncludeFailure | undefined; }) => Result.Success | (IncludeFailure extends true ? Result.Failure : never); /** * @since 1.0.0 * @category hooks */ export declare const useAtomSubscribe: (atom: Atom.Atom, f: (_: A) => void, options?: { readonly immediate?: boolean; }) => void; /** * @since 1.0.0 * @category hooks */ export declare const useAtomRef: (ref: AtomRef.ReadonlyRef) => A; /** * @since 1.0.0 * @category hooks */ export declare const useAtomRefProp: (ref: AtomRef.AtomRef, prop: K) => AtomRef.AtomRef; /** * @since 1.0.0 * @category hooks */ export declare const useAtomRefPropValue: (ref: AtomRef.AtomRef, prop: K) => A[K]; //# sourceMappingURL=Hooks.d.ts.map