import { IAsyncParallel , IParallelEnumerable , ParallelGeneratorType } from "../../types" ; import { BasicParallelEnumerable } from "../BasicParallelEnumerable" ; param source param predicate returns export const where = < TSource > ( source , predicate ) : IParallelEnumerable < TSource > => { const generator = async ( ) => { const values = await source . toArray ( ) ; return values . filter ( predicate ) ; } ; return new BasicParallelEnumerable ( { generator , type : ParallelGeneratorType . PromiseToArray , } ) ; } ;