|
|
@ -380,7 +380,7 @@ export class TernarySearchTree { |
|
|
|
return count(this.entries(), predicate === undefined ? undefined : ([, e]) => predicate(e)); |
|
|
|
} |
|
|
|
|
|
|
|
entries(): Iterable<[K, V]> { |
|
|
|
entries(): IterableIterator<[K, V]> { |
|
|
|
return this._iterator(this._root); |
|
|
|
} |
|
|
|
|
|
|
@ -391,7 +391,7 @@ export class TernarySearchTree { |
|
|
|
highlander(): [K, V] | undefined { |
|
|
|
if (this._root === undefined || this._root.isEmpty()) return undefined; |
|
|
|
|
|
|
|
const entries = this.entries() as IterableIterator<[K, V]>; |
|
|
|
const entries = this.entries(); |
|
|
|
|
|
|
|
let count = 0; |
|
|
|
let next: IteratorResult<[K, V]>; |
|
|
|