UNPKG

jotai

Version:

👻 Next gen state management that will spook you

16 lines (15 loc) • 618 B
import type { Atom, Scope } from '../core/atom'; declare type AnyAtomValue = unknown; declare type AnyAtom = Atom<AnyAtomValue>; declare type AtomsValues = Map<AnyAtom, AnyAtomValue>; declare type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>; declare type AtomsSnapshot = Readonly<{ values: AtomsValues; dependents: AtomsDependents; }>; /** * @deprecated use object snapshot instead */ declare type DeprecatedIterableSnapshot = Iterable<readonly [AnyAtom, AnyAtomValue]>; export declare function useGotoAtomsSnapshot(scope?: Scope): (snapshot: AtomsSnapshot | DeprecatedIterableSnapshot) => void; export {};