jotai
Version:
👻 Next gen state management that will spook you
19 lines • 702 B
TypeScript
import { Atom, Scope } from '../core/atom';
declare type AnyAtomValue = unknown;
declare type AnyAtom = Atom<AnyAtomValue>;
declare type AtomsValues = Map<AnyAtom, AnyAtomValue>;
declare type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>;
declare type AtomsSnapshot = Readonly<{
values: AtomsValues;
dependents: AtomsDependents;
}>;
/**
* @deprecated use object snapshot instead
*/
declare type DeprecatedIterableSnapshot = Iterable<readonly [
AnyAtom,
AnyAtomValue
]>;
export declare function useGotoAtomsSnapshot(scope?: Scope): (snapshot: AtomsSnapshot | DeprecatedIterableSnapshot) => void;
export {};
declare type Awaited<T> = T extends Promise<infer V> ? V : T;