1 | import * as O from 'optics-ts';
|
2 | import type { SetStateAction, WritableAtom } from 'jotai';
|
3 | declare type NonFunction<T> = [T] extends [(...args: any[]) => any] ? never : T;
|
4 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<Promise<S>, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Prism<S, any, A>): WritableAtom<A | undefined, SetStateAction<A>, R>;
|
5 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<Promise<S>, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Traversal<S, any, A>): WritableAtom<A[], SetStateAction<A>, R>;
|
6 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<Promise<S>, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Lens<S, any, A> | O.Equivalence<S, any, A> | O.Iso<S, any, A>): WritableAtom<A, SetStateAction<A>, R>;
|
7 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<S, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Prism<S, any, A>): WritableAtom<A | undefined, SetStateAction<A>, R>;
|
8 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<S, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Traversal<S, any, A>): WritableAtom<A[], SetStateAction<A>, R>;
|
9 | export declare function focusAtom<S, A, R extends void | Promise<void>>(baseAtom: WritableAtom<S, NonFunction<S>, R>, callback: (optic: O.OpticFor<S>) => O.Lens<S, any, A> | O.Equivalence<S, any, A> | O.Iso<S, any, A>): WritableAtom<A, SetStateAction<A>, R>;
|
10 | export {};
|