UNPKG

790 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}>;
12/**
13 * @deprecated use object snapshot instead
14 */
15type DeprecatedIterableSnapshot = Iterable<readonly [
16 AnyAtom,
17 AnyAtomValue
18]>;
19export declare function useGotoAtomsSnapshot(scope?: Scope): (snapshot: AtomsSnapshot | DeprecatedIterableSnapshot) => void;
20export {};
21declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file