Files
infocom-systems-design/node_modules/jotai/vanilla/utils/atomWithReset.d.ts
2025-10-03 22:27:28 +03:00

9 lines
408 B
TypeScript

import type { WritableAtom } from 'jotai/vanilla';
import { RESET } from './constants';
type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
type WithInitialValue<Value> = {
init: Value;
};
export declare function atomWithReset<Value>(initialValue: Value): WritableAtom<Value, [SetStateActionWithReset<Value>], void> & WithInitialValue<Value>;
export {};