export declare type SetStateAction = Value | ((prev: Value) => Value); export declare type NonFunction = Value extends (...args: any[]) => any ? never : Value; export declare type Getter = (atom: Atom) => Value; export declare type Read = (get: Getter) => Value | Promise; export declare type Setter = (atom: WritableAtom, update: Update) => void; export declare type Write = (get: Getter, set: Setter, update: Update) => void | Promise; 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: Read; }; export declare type WritableAtom = Atom & { write: Write; onMount?: OnMount; }; export declare type WithInitialValue = { init: Value; }; export declare type PrimitiveAtom = WritableAtom>; export declare type AnyAtom = Atom; export declare type AnyWritableAtom = WritableAtom;