1 | import type { ExtractAtomArgs, ExtractAtomResult, WritableAtom } from 'jotai/vanilla';
|
2 | import { useStore } from './Provider';
|
3 | type SetAtom<Args extends any[], Result> = (...args: Args) => Result;
|
4 | type Store = ReturnType<typeof useStore>;
|
5 | type Options = {
|
6 | store?: Store;
|
7 | };
|
8 | export declare function useSetAtom<Value, Args extends any[], Result>(atom: WritableAtom<Value, Args, Result>, options?: Options): SetAtom<Args, Result>;
|
9 | export declare function useSetAtom<AtomType extends WritableAtom<any, any[], any>>(atom: AtomType, options?: Options): SetAtom<ExtractAtomArgs<AtomType>, ExtractAtomResult<AtomType>>;
|
10 | export {};
|