UNPKG

663 BTypeScriptView Raw
1import type { Atom, WritableAtom, SetAtom } from './atom';
2export declare function useAtom<Value, Update>(atom: WritableAtom<Value | Promise<Value>, Update>): [Value, SetAtom<Update>];
3export declare function useAtom<Value, Update>(atom: WritableAtom<Promise<Value>, Update>): [Value, SetAtom<Update>];
4export declare function useAtom<Value, Update>(atom: WritableAtom<Value, Update>): [Value, SetAtom<Update>];
5export declare function useAtom<Value>(atom: Atom<Value | Promise<Value>>): [Value, never];
6export declare function useAtom<Value>(atom: Atom<Promise<Value>>): [Value, never];
7export declare function useAtom<Value>(atom: Atom<Value>): [Value, never];