type Getter = (atom: Atom) => Value; type Setter = (atom: WritableAtom, ...args: Args) => Result; type SetAtom = (...args: A) => Result; type Read = (get: Getter, options: { readonly signal: AbortSignal; readonly setSelf: SetSelf; }) => Value; type Write = (get: Getter, set: Setter, ...args: Args) => Result; type WithInitialValue = { init: Value; }; type OnUnmount = () => void; type OnMount = >(setAtom: S) => OnUnmount | void; export interface Atom { toString: () => string; read: Read; debugLabel?: string; /** * To ONLY be used by Jotai libraries to mark atoms as private. Subject to change. * @private */ debugPrivate?: boolean; } export interface WritableAtom extends Atom { read: Read>; 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 {};