UNPKG

457 BTypeScriptView Raw
1import type { SetStateAction, WritableAtom } from 'jotai/vanilla';
2import { RESET } from './constants';
3type Read<Value, Args extends unknown[], Result> = WritableAtom<Value, Args, Result>['read'];
4export declare function atomWithDefault<Value>(getDefault: Read<Value, [
5 SetStateAction<Awaited<Value>> | typeof RESET
6], void | Promise<void>>): WritableAtom<Value, [
7 SetStateAction<Awaited<Value>> | typeof RESET
8], void | Promise<void>>;
9export {};