import { fromAsync } from "../../async/static/fromAsync" ; import { IAsyncEnumerable , IAsyncEqualityComparer } from "../../types" ; param first param second param comparer returns export const exceptAsync = < TSource > ( first , second , comparer ) : IAsyncEnumerable < TSource > => { async function * iterator ( ) { const secondArray = [ ... second ] ; for ( const firstItem of first ) { let exists = false ; for ( let j = 0 ; j < secondArray . length ; j ++ ) { const secondItem = secondArray [ j ] ; if ( await comparer ( firstItem , secondItem ) === true ) { exists = true ; break ; } } if ( exists === false ) { yield firstItem ; } } } return fromAsync ( iterator ) ; } ;