import { fromParallel } from "../../parallel/static/fromParallel" ; import { IParallelEnumerable , ParallelGeneratorType } from "../../types" ; param source returns export const asParallel = < TSource > ( source ) : IParallelEnumerable < TSource > => { const generator = async ( ) => { const data = [ ] ; for await ( const value of source ) { data . push ( value ) ; } return data ; } ; return fromParallel ( ParallelGeneratorType . PromiseToArray , generator ) ; } ;