UNPKG

jotai

Version:

👻 Next gen state management that will spook you

10 lines (9 loc) • 457 B
import type { SetStateAction, WritableAtom } from 'jotai/vanilla'; import { RESET } from './constants'; type Read<Value, Args extends unknown[], Result> = WritableAtom<Value, Args, Result>['read']; export declare function atomWithDefault<Value>(getDefault: Read<Value, [ SetStateAction<Awaited<Value>> | typeof RESET ], void | Promise<void>>): WritableAtom<Value, [ SetStateAction<Awaited<Value>> | typeof RESET ], void | Promise<void>>; export {};