Test/node_modules/jotai/ts3.8/esm/react/useAtomValue.d.ts
2026-04-09 22:54:00 +07:00

9 lines
No EOL
494 B
TypeScript

import type { Atom, ExtractAtomValue } from 'jotai/vanilla';
import { useStore } from './Provider';
type Options = Parameters<typeof useStore>[0] & {
delay?: number;
};
export declare function useAtomValue<Value>(atom: Atom<Value>, options?: Options): Awaited<Value>;
export declare function useAtomValue<AtomType extends Atom<unknown>>(atom: AtomType, options?: Options): Awaited<ExtractAtomValue<AtomType>>;
export {};
declare type Awaited<T> = T extends Promise<infer V> ? V : T;