UNPKG

372 BTypeScriptView Raw
1import type { Atom, WritableAtom, PrimitiveAtom } from './atom';
2export declare type ExtractAtomValue<AtomType> = AtomType extends Atom<infer Value> ? Value : never;
3export declare type ExtractAtomUpdate<AtomType> = AtomType extends WritableAtom<unknown, infer Update> ? Update : never;
4export declare type SetStateAction<Value> = ExtractAtomUpdate<PrimitiveAtom<Value>>;