import { IArrayEl, IAsyncTryCatch, ICtxAsyncTryCatch, ICtxTryCatch, IEnumLike, IFuncArgs, ITryCatch, IValOf, IWithAsyncTryCatch, IWithTryCatch, MyAsyncGenerator } from '../types'; /** * This relies blindly that `Promise.race(promises)` will resolve with `promises[0]` * * even if all `promises` were resolved when passed. */ export declare const getPromiseState: (promise: PromiseLike) => Promise<"pending" | "fulfilled" | "rejected">; /** * Returns an iterator, yielding the value of `'fulfilled'` promises first. * * In case a promise is rejected, the iterator will yield an `Error` instance instead. */ export declare function racePromisesIterator(promises: PromiseLike[]): MyAsyncGenerator; export declare const arrayUniqueByProp: >(arr: Array, prop: keyof T) => Array; /** * If you are not certain of the types for the `arr` values, * * consider validating the result with `Number.isNaN(result)` */ export declare const arraySum: >(arr: T) => IArrayEl extends number ? number : never; /** * Returns a copy of the `arr` which halts at the first `false` occurence for `predicate`. */ export declare const arrayFilterHalt: (arr: Array, predicate: IFuncArgs["findIndex"]>[0]) => Array; /** * Consider using `new Set(arr)` */ export declare const arrayUnique: (arr: Array) => Array; export declare const extractEnumNumbers: (en: T) => Array>; export declare const tryCatch: ITryCatch; export declare const ctxTryCatch: ICtxTryCatch; export declare const asyncTryCatch: IAsyncTryCatch; export declare const ctxAsyncTryCatch: ICtxAsyncTryCatch; export declare const withTryCatch: IWithTryCatch; export declare const withAsyncTryCatch: IWithAsyncTryCatch;