Skip to content

Commit

Permalink
feat(memory): add iterator
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Oct 8, 2024
1 parent 72a6640 commit 23bba65
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/memory/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export abstract class BaseMemory<TState = unknown> extends Serializable<TState>
return new ReadOnlyMemory(this);
}

[Symbol.iterator]() {
return this.messages[Symbol.iterator]();
}

abstract loadSnapshot(state: TState): void;
abstract createSnapshot(): TState;
}
Expand Down

0 comments on commit 23bba65

Please sign in to comment.