UNPKG

395 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, [SetStateAction<Value> | typeof RESET], void>): WritableAtom<Value, [SetStateAction<Value> | typeof RESET], void>;
5export {};