UNPKG

jotai

Version:

👻 Next gen state management that will spook you

14 lines (13 loc) • 570 B
import { SECRET_INTERNAL_getScopeContext as getScopeContext } from 'jotai'; import type { Atom } from '../core/atom'; declare type Scope = NonNullable<Parameters<typeof getScopeContext>[0]>; 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; }>; export declare function useAtomsSnapshot(scope?: Scope): AtomsSnapshot; export {};