export declare type SetStateAction = Value | ((prev: Value) => Value); export declare type Getter = (atom: Atom) => Value; export declare type Setter = (atom: WritableAtom, update: Update) => void; export declare type Scope = symbol | string | number; export declare type SetAtom = undefined extends Update ? (update?: Update) => void | Promise : (update: Update) => void | Promise; export declare type OnUnmount = () => void; export declare type OnMount = >(setAtom: S) => OnUnmount | void; export declare type Atom = { toString: () => string; debugLabel?: string; scope?: Scope; read: (get: Getter) => Value | Promise; }; export declare type WritableAtom = Atom & { write: (get: Getter, set: Setter, update: Update) => void | Promise; onMount?: OnMount; }; export declare type WithInitialValue = { init: Value; }; export declare type PrimitiveAtom = WritableAtom>; export declare type AnyAtom = Atom; export declare type AnyWritableAtom = WritableAtom;