UNPKG

587 BTypeScriptView Raw
1import { useAtom } from 'jotai';
2import { PrimitiveAtom } from 'jotai';
3type Scope = NonNullable<Parameters<typeof useAtom>[1]>;
4export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a?: Action) => Value, scope?: Scope): [
5 Value,
6 (action?: Action) => void
7];
8export declare function useReducerAtom<Value, Action>(anAtom: PrimitiveAtom<Value>, reducer: (v: Value, a: Action) => Value, scope?: Scope): [
9 Value,
10 (action: Action) => void
11];
12export {};
13declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file