UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

25 lines (24 loc) 2.81 kB
export type AsyncIterableLike<T> = Iterable<Promise<T> | T> | AsyncIterable<T>; export declare function filter<T, U extends T>(iterable: AsyncIterableLike<T>, predicate: (element: T) => element is U): AsyncIterable<U>; export declare function filter<T>(iterable: AsyncIterableLike<T>, predicate: (element: T) => Promise<boolean> | boolean): AsyncIterable<T>; export declare function asyncFilter<T, U extends T>(iterable: AsyncIterableLike<T>, predicate: (element: T) => element is U): AsyncIterable<U>; export declare function asyncFilter<T>(iterable: AsyncIterableLike<T>, predicate: (element: T) => Promise<boolean> | boolean): AsyncIterable<T>; export declare function filterFn<T, U extends T>(predicate: (element: T) => element is U): (iterable: AsyncIterableLike<T>) => AsyncIterable<U>; export declare function filterFn<T>(predicate: (element: T) => Promise<boolean> | boolean): (iterable: AsyncIterableLike<T>) => AsyncIterable<T>; export declare function asyncFilterFn<T, U extends T>(predicate: (element: T) => element is U): (iterable: AsyncIterableLike<T>) => AsyncIterable<U>; export declare function asyncFilterFn<T>(predicate: (element: T) => Promise<boolean> | boolean): (iterable: AsyncIterableLike<T>) => AsyncIterable<T>; export declare function exclude<T>(iterable: AsyncIterableLike<T>, predicate: (element: T) => Promise<boolean> | boolean): AsyncIterable<T>; export declare const asyncExclude: typeof exclude; export declare function excludeFn<T>(predicate: (element: T) => Promise<boolean> | boolean): (iterable: AsyncIterableLike<T>) => AsyncIterable<T>; export declare const asyncExcludeFn: typeof excludeFn; export declare function excludeNull<T>(iterable: AsyncIterableLike<T | null | undefined>): AsyncIterable<T>; export declare const asyncExcludeNull: typeof excludeNull; export declare function map<T, U>(iterable: AsyncIterableLike<T>, f: (element: T) => Promise<U> | U): AsyncIterable<U>; export declare const asyncMap: typeof map; export declare function mapFn<T, U>(f: (element: T) => Promise<U> | U): (iterable: AsyncIterableLike<T>) => AsyncIterable<U>; export declare const asyncMapFn: typeof mapFn; export declare function asyncConcatMap<T, U>(iterable: AsyncIterableLike<T>, f: (element: T) => AsyncIterableLike<U>): AsyncIterable<U>; export declare function asyncConcatMapFn<T, U>(f: (element: T) => AsyncIterableLike<U>): (iterable: AsyncIterableLike<T>) => AsyncIterable<U>; export declare function asyncFold<T, U>(iterable: AsyncIterableLike<T>, f: (accumulator: U, element: T) => Promise<U> | U, initial: U): Promise<U>; export declare function asyncFoldFn<T, U>(f: (accumulator: U, element: T) => Promise<U> | U, initial: U): (iterable: AsyncIterableLike<T>) => Promise<U>; export declare function combineAsync<T>(iterable: AsyncIterableLike<T>): Promise<T[]>;