1 | import type { Atom, PrimitiveAtom, WritableAtom } from './atom';
|
2 | export declare type Getter = Parameters<Atom<unknown>['read']>[0];
|
3 | export declare type Setter = Parameters<WritableAtom<unknown, unknown>['write']>[1];
|
4 | export declare type ExtractAtomValue<AtomType> = AtomType extends Atom<infer Value> ? Value : never;
|
5 | export declare type ExtractAtomUpdate<AtomType> = AtomType extends WritableAtom<unknown, infer Update> ? Update : never;
|
6 | export declare type SetStateAction<Value> = ExtractAtomUpdate<PrimitiveAtom<Value>>;
|