param source param predicate returns export const partitionAsync = async < TSource > ( source , predicate ) : Promise < [ pass : TSource [ ] , fail : TSource [ ] ] > => { const fail = [ ] ; const pass = [ ] ; for await ( const value of source ) { if ( await predicate ( value ) === true ) { pass . push ( value ) ; } else { fail . push ( value ) ; } } return [ pass , fail ] ; } ;