jotai
Version:
👻 Next gen state management that will spook you
14 lines • 591 B
TypeScript
import { SECRET_INTERNAL_getScopeContext as getScopeContext } from 'jotai';
import { Atom } from '../core/atom';
type Scope = NonNullable<Parameters<typeof getScopeContext>[0]>;
type AnyAtomValue = unknown;
type AnyAtom = Atom<AnyAtomValue>;
type AtomsValues = Map<AnyAtom, AnyAtomValue>;
type AtomsDependents = Map<AnyAtom, Set<AnyAtom>>;
type AtomsSnapshot = Readonly<{
values: AtomsValues;
dependents: AtomsDependents;
}>;
export declare function useAtomsSnapshot(scope?: Scope): AtomsSnapshot;
export {};
declare type Awaited<T> = T extends Promise<infer V> ? V : T;