From 8c3ae57497eed173b2a469da61f0938410ca5c2f Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 30 Nov 2021 17:05:39 +0100 Subject: [PATCH] fix Iterator vs IterableIterator confusion --- src/observable/list/BaseObservableList.ts | 4 ++-- src/platform/web/ui/general/Range.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/observable/list/BaseObservableList.ts b/src/observable/list/BaseObservableList.ts index 6d8bd1af..d103eb64 100644 --- a/src/observable/list/BaseObservableList.ts +++ b/src/observable/list/BaseObservableList.ts @@ -35,7 +35,7 @@ export function defaultObserverWith(overrides: { [key in keyof IListObserver< return Object.assign(defaults, overrides); } -export abstract class BaseObservableList extends BaseObservable> { +export abstract class BaseObservableList extends BaseObservable> implements Iterable { emitReset() { for(let h of this._handlers) { h.onReset(this); @@ -69,6 +69,6 @@ export abstract class BaseObservableList extends BaseObservable; abstract get length(): number; } diff --git a/src/platform/web/ui/general/Range.ts b/src/platform/web/ui/general/Range.ts index 16dc0a33..a3ca54c0 100644 --- a/src/platform/web/ui/general/Range.ts +++ b/src/platform/web/ui/general/Range.ts @@ -43,7 +43,7 @@ export class Range { return range.start < this.end && this.start < range.end; } - forEachInIterator(it: IterableIterator, callback: ((T, i: number) => void)) { + forEachInIterator(it: Iterator, callback: ((T, i: number) => void)) { let i = 0; for (i = 0; i < this.start; i += 1) { it.next();