type Getter = (atom: Atom) => Value; type Setter = (atom: WritableAtom, ...args: Args) => Result; type Retry = () => void; type Read = (get: Getter, options: { readonly signal: AbortSignal; readonly retry: Retry; }) => Value; type Write = (get: Getter, set: Setter, ...args: Args) => Result; type WithInitialValue = { init: Value; }; type SetAtom = (...args: Args) => Result; type OnUnmount = () => void; type OnMount = >(setAtom: S) => OnUnmount | void; export interface Atom { toString: () => string; debugLabel?: string; read: Read; } export interface WritableAtom extends Atom { write: Write; onMount?: OnMount; } type SetStateAction = Value | ((prev: Value) => Value); export type PrimitiveAtom = WritableAtom ], void>; export declare function atom(read: Read, write: Write): WritableAtom; export declare function atom(read: Read): Atom; export declare function atom(initialValue: Value, write: Write): WritableAtom & WithInitialValue; export declare function atom(initialValue: Value): PrimitiveAtom & WithInitialValue; export {};