From 23bba65aac99fc24c2ae2002fd76677956520faa Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 8 Oct 2024 11:07:49 +0200 Subject: [PATCH] feat(memory): add iterator Signed-off-by: Tomas Dvorak --- src/memory/base.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/memory/base.ts b/src/memory/base.ts index db5f7068..66b8df86 100644 --- a/src/memory/base.ts +++ b/src/memory/base.ts @@ -47,6 +47,10 @@ export abstract class BaseMemory extends Serializable return new ReadOnlyMemory(this); } + [Symbol.iterator]() { + return this.messages[Symbol.iterator](); + } + abstract loadSnapshot(state: TState): void; abstract createSnapshot(): TState; }