import { Atom, SetAtom, WritableAtom } from './atom'; import { ExtractAtomResult, ExtractAtomUpdate, ExtractAtomValue } from './typeUtils'; import { useAtomValue } from './useAtomValue'; type Scope = NonNullable[1]>; export declare function useAtom>(atom: WritableAtom, Update, Result>, scope?: Scope): [ Value, SetAtom ]; export declare function useAtom(atom: Atom>, scope?: Scope): [ Value, never ]; export declare function useAtom>(atom: WritableAtom, scope?: Scope): [ Awaited, SetAtom ]; export declare function useAtom(atom: Atom, scope?: Scope): [ Awaited, never ]; export declare function useAtom>>(atom: AtomType, scope?: Scope): [ Awaited>, SetAtom, ExtractAtomResult> ]; export declare function useAtom>(atom: AtomType, scope?: Scope): [ Awaited>, never ]; export {}; declare type Awaited = T extends Promise ? V : T;