import type { Atom, Getter, WritableAtom } from 'jotai'; declare global { interface SymbolConstructor { readonly observable: symbol; } } declare type Subscription = { unsubscribe: () => void; }; declare type Observer = { next: (value: T) => void; error: (error: unknown) => void; complete: () => void; }; declare type ObservableLike = { subscribe(observer: Observer): Subscription; subscribe(next: (value: T) => void, error?: (error: unknown) => void, complete?: () => void): Subscription; [Symbol.observable]?: () => ObservableLike | undefined; }; declare type SubjectLike = ObservableLike & Observer; declare type InitialValueFunction = () => T | undefined; declare type AtomWithObservableOptions = { initialValue?: TData | InitialValueFunction; }; export declare function atomWithObservable(createObservable: (get: Getter) => SubjectLike, options?: AtomWithObservableOptions): WritableAtom; export declare function atomWithObservable(createObservable: (get: Getter) => ObservableLike, options?: AtomWithObservableOptions): Atom; export {};