1 | import type { Atom } from 'jotai';
|
2 | declare type Awaited<T> = T extends Promise<infer V> ? Awaited<V> : T;
|
3 | declare type ResolveAtom<T> = T extends Atom<infer V> ? V : T;
|
4 | declare type AwaitedAtom<T> = Awaited<ResolveAtom<T>>;
|
5 | export declare function waitForAll<Atoms extends Atom<unknown>[]>(atoms: readonly [...Atoms]): Atom<{
|
6 | [K in keyof Atoms]: AwaitedAtom<Atoms[K]>;
|
7 | }>;
|
8 | export declare function waitForAll<Atoms extends Record<string, Atom<unknown>>>(atoms: Atoms): Atom<{
|
9 | [K in keyof Atoms]: AwaitedAtom<Atoms[K]>;
|
10 | }>;
|
11 | export {};
|