UNPKG

alinea

Version:
10 lines (9 loc) 338 B
import { type Atom } from 'jotai'; interface KeepDataOptions<Value> { initialValue?: Value; compare?: (a: Value, b: Value) => boolean; } export declare function keepPreviousData<Value>(asyncAtom: Atom<Promise<Value>>, options?: KeepDataOptions<Value>): Atom<Promise<Value>> & { current: Atom<Value | undefined>; }; export {};