1 | import { Atom, Scope, SetAtom, WritableAtom } from './atom';
|
2 | declare type Awaited<T> = T extends Promise<infer V> ? Awaited<V> : T;
|
3 | export declare function useAtom<Value, Update, Result extends void | Promise<void>>(atom: WritableAtom<Value, Update, Result>, scope?: Scope): [
|
4 | Awaited<Value>,
|
5 | SetAtom<Update, Result>
|
6 | ];
|
7 | export declare function useAtom<Value>(atom: Atom<Value>, scope?: Scope): [
|
8 | Awaited<Value>,
|
9 | never
|
10 | ];
|
11 | export {};
|