UNPKG

641 BTypeScriptView Raw
1import { 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 [
14 AnyAtom,
15 AnyAtomValue
16]>;
17export declare function useGotoAtomsSnapshot(scope?: Scope): (snapshot: AtomsSnapshot | DeprecatedIterableSnapshot) => void;
18export {};