/** * Returns an array of two arrays, one will all resolved promises, and one with all rejected promises */ export declare const robustPromiseAll: (promises: Promise[]) => Promise<[T[], E[]]>; export declare const groupResolvePromises: (promiseList: Promise[], evaluationFn: (res: T) => boolean, maxLosses: number, minWins: number) => Promise<{ success: boolean; wins: T[]; losses: T[]; errors: E[]; }>; /** * Wraps an async function call with a max timeout. * @param fn - The async function to call. * @param timeoutMs - The maximum time in milliseconds to wait for the function to complete. * @returns A promise that resolves with the function's return value, or "timeout" if the timeout expires first. */ export declare function withTimeout(fn: () => Promise, timeoutMs: number): Promise;