import { useStore } from 'jotai/react'; import { createStore, Atom } from 'jotai/vanilla'; import { INTERNAL_Store, INTERNAL_AtomState, INTERNAL_MountedMap } from 'jotai/vanilla/internals'; type DevStore = { get_internal_weak_map: () => { get: (atom: Atom) => INTERNAL_AtomState | undefined; }; get_mounted_atoms: () => Set>; get_mounted_map: () => Pick; restore_atoms: (values: Iterable, unknown]>) => void; }; type StoreWithoutDevMethods = ReturnType; type StoreWithDevMethods = INTERNAL_Store & DevStore; type Store = StoreWithoutDevMethods | StoreWithDevMethods; type Options = Parameters[0]; type AnyAtomValue = unknown; type AnyAtom = Atom; type AtomsValues = Map; type AtomsDependents = Map>; type AtomsSnapshot = Readonly<{ values: AtomsValues; dependents: AtomsDependents; }>; export type { AtomsSnapshot as A, Options as O, Store as S };