1 | import { Getter, Setter, Atom, WritableAtom, PrimitiveAtom, NonPromise, NonFunction } from './types';
|
2 | export declare function atom<Value, Update>(read: (get: Getter) => NonPromise<Value>, write: (get: Getter, set: Setter, update: Update) => void | Promise<void>): WritableAtom<Value, Update>;
|
3 | export declare function atom<Value, Update>(read: NonFunction<NonPromise<Value>>, write: (get: Getter, set: Setter, update: Update) => void | Promise<void>): WritableAtom<Value, Update>;
|
4 | export declare function atom<Value, Update>(read: (get: Getter) => Promise<Value>, write: (get: Getter, set: Setter, update: Update) => void | Promise<void>): WritableAtom<Value | Promise<Value>, Update>;
|
5 | export declare function atom<Value>(read: (get: Getter) => NonPromise<Value>): Atom<Value>;
|
6 | export declare function atom<Value>(read: (get: Getter) => Promise<Value>): Atom<Value | Promise<Value>>;
|
7 | export declare function atom<Value>(initialValue: NonFunction<NonPromise<Value>>): PrimitiveAtom<Value>;
|