UNPKG

522 BTypeScriptView Raw
1import { SECRET_INTERNAL_getScopeContext as getScopeContext } from 'jotai';
2import type { Atom } from '../core/atom';
3type Scope = NonNullable<Parameters<typeof getScopeContext>[0]>;
4type AnyAtomValue = unknown;
5type AnyAtom = Atom<AnyAtomValue>;
6type AtomsValues = Map<AnyAtom, AnyAtomValue>;
7type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>;
8type AtomsSnapshot = Readonly<{
9 values: AtomsValues;
10 dependents: AtomsDependents;
11}>;
12export declare function useAtomsSnapshot(scope?: Scope): AtomsSnapshot;
13export {};