UNPKG

519 BTypeScriptView Raw
1import { Atom, ExtractAtomValue } from 'jotai/vanilla';
2import { useStore } from './Provider';
3type Store = ReturnType<typeof useStore>;
4type Options = {
5 store?: Store;
6 delay?: number;
7};
8export declare function useAtomValue<Value>(atom: Atom<Value>, options?: Options): Awaited<Value>;
9export declare function useAtomValue<AtomType extends Atom<unknown>>(atom: AtomType, options?: Options): Awaited<ExtractAtomValue<AtomType>>;
10export {};
11declare type Awaited<T> = T extends Promise<infer V> ? V : T;
\No newline at end of file