UNPKG

jotai

Version:

👻 Next gen state management that will spook you

8 lines (7 loc) • 583 B
import type { Atom, SetStateAction, WritableAtom } from 'jotai'; import { RESET } from './constants'; declare type Read<Value> = Atom<Value>['read']; export declare function atomWithDefault<Value>(getDefault: Read<Value | Promise<Value>>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>; export declare function atomWithDefault<Value>(getDefault: Read<Promise<Value>>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>; export declare function atomWithDefault<Value>(getDefault: Read<Value>): WritableAtom<Value, SetStateAction<Value> | typeof RESET>; export {};