Skip to content

Commit

Permalink
feat: loosen pairwiseTraversal generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
tabcat committed Jun 23, 2024
1 parent 133ff71 commit 1b21349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ export const iteratorIsDone = (result: IteratorResult<unknown>): boolean =>
* @param target - Target ordered set
* @param comparator - Used to compare two set elements, same as Array.sort parameter
*/
export function* pairwiseTraversal<T, A extends T, B extends T>(
export function* pairwiseTraversal<A, B>(
source: Iterable<A>,
target: Iterable<B>,
comparator: (a: T, b: T) => number,
comparator: (a: A, b: B) => number,
): Generator<[...PairwiseElement<A, B>, ...PairwiseDone]> {
const iteratorS = source[Symbol.iterator]();
const iteratorT = target[Symbol.iterator]();
Expand Down

0 comments on commit 1b21349

Please sign in to comment.