import { StrictEqualityComparer } from "../../shared" ; import { IEnumerable , IEqualityComparer } from "../../types" ; import { BasicEnumerable } from "../BasicEnumerable" ; param outer param inner param outerKeySelector param innerKeySelector param resultSelector param comparer returns export const join = < TOuter , TInner , TKey , TResult > ( outer , inner , outerKeySelector , innerKeySelector , resultSelector , comparer = StrictEqualityComparer ) : IEnumerable < TResult > => { function * iterator ( ) { const innerArray = [ ... inner ] ; for ( const o of outer ) { const outerKey = outerKeySelector ( o ) ; for ( const i of innerArray ) { const innerKey = innerKeySelector ( i ) ; if ( comparer ( outerKey , innerKey ) === true ) { yield resultSelector ( o , i ) ; } } } } return new BasicEnumerable ( iterator ) ; } ;