UNPKG

591 BTypeScriptView Raw
1import { SECRET_INTERNAL_getScopeContext as getScopeContext } from 'jotai';
2import { 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 {};
14declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file