UNPKG

618 BTypeScriptView Raw
1import type { Atom, Scope } from '../core/atom';
2declare type AnyAtomValue = unknown;
3declare type AnyAtom = Atom<AnyAtomValue>;
4declare type AtomsValues = Map<AnyAtom, AnyAtomValue>;
5declare type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>;
6declare type AtomsSnapshot = Readonly<{
7 values: AtomsValues;
8 dependents: AtomsDependents;
9}>;
10/**
11 * @deprecated use object snapshot instead
12 */
13declare type DeprecatedIterableSnapshot = Iterable<readonly [AnyAtom, AnyAtomValue]>;
14export declare function useGotoAtomsSnapshot(scope?: Scope): (snapshot: AtomsSnapshot | DeprecatedIterableSnapshot) => void;
15export {};