lazzy.ts
Version:
Fast and lightweight library for lazy operations with iterable objects.
3 lines • 386 B
TypeScript
export declare function firstWithIndex<T, R, N>(iterator: Iterator<T, R, N>, predicate: (value: T, index: number) => boolean): [T | undefined, number];
export declare function firstWithIndexAsync<T, R, N>(iterator: AsyncIterator<T, R, N>, predicate: (value: T, index: number) => boolean | Promise<boolean>): Promise<[T | undefined, number]>;
//# sourceMappingURL=firstWithIndex.d.ts.map