UNPKG

prray

Version:

'Promisified' Array, comes with async method supports(such as mapAsync). And it is compatible with normal array.

24 lines 984 B
import { PrrayPromise } from '../src/prraypromise'; export declare const isGte3Async: (v: number) => Promise<boolean>; export declare const isGte3: (v: number) => boolean; export declare const isEven: (i: number) => boolean; export declare const isEvenAsync: (i: number) => Promise<boolean>; export declare const addOneAsync: (i: number) => Promise<number>; export declare const addOne: (i: number) => number; /** * Returns a promise that will resolved after special time. */ export declare function delay(ms: number): Promise<unknown>; /** * Generate array with random numbers in special length. */ export declare function genRandArr(len?: number): number[]; export declare function timer(): () => number; /** * Returns a prraypromise resolved with special array. */ export declare function toPrrayPromise<T>(arr: T[]): PrrayPromise<T>; export declare function isClose(n1: number, n2: number, opt?: { threshold: number; }): boolean; //# sourceMappingURL=test-utils.d.ts.map