From 1b21349855d0b0e89bec8549790efa3711f2b6e8 Mon Sep 17 00:00:00 2001 From: tabcat Date: Sun, 23 Jun 2024 17:38:16 -0400 Subject: [PATCH] feat: loosen pairwiseTraversal generic types --- src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.ts b/src/util.ts index 95af552..fdd3491 100644 --- a/src/util.ts +++ b/src/util.ts @@ -79,10 +79,10 @@ export const iteratorIsDone = (result: IteratorResult): boolean => * @param target - Target ordered set * @param comparator - Used to compare two set elements, same as Array.sort parameter */ -export function* pairwiseTraversal( +export function* pairwiseTraversal( source: Iterable, target: Iterable, - comparator: (a: T, b: T) => number, + comparator: (a: A, b: B) => number, ): Generator<[...PairwiseElement, ...PairwiseDone]> { const iteratorS = source[Symbol.iterator](); const iteratorT = target[Symbol.iterator]();