UNPKG

575 BTypeScriptView Raw
1import type { Atom, SetStateAction, WritableAtom } from 'jotai';
2import { RESET } from './constants';
3type Read<Value> = Atom<Value>['read'];
4export declare function atomWithDefault<Value>(getDefault: Read<Value | Promise<Value>>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>;
5export declare function atomWithDefault<Value>(getDefault: Read<Promise<Value>>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>;
6export declare function atomWithDefault<Value>(getDefault: Read<Value>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>;
7export {};