param source param predicate returns export const firstOrDefaultAsync = async < TSource > ( source , predicate ) : Promise < TSource | null > => { for await ( const value of source ) { if ( await predicate ( value ) === true ) { return value ; } } return null ; } ;