We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 310f072 commit 481f178Copy full SHA for 481f178
packages/quickjs-emscripten-core/src/QuickJSIterator.ts
@@ -28,7 +28,7 @@ import type { QuickJSHandle } from "./types"
28
*/
29
export class QuickJSIterator
30
extends UsingDisposable
31
- implements Disposable, Iterator<ContextResult<QuickJSHandle>>
+ implements Disposable, IterableIterator<ContextResult<QuickJSHandle>>
32
{
33
public owner: QuickJSRuntime
34
private _next: QuickJSHandle | undefined
@@ -42,6 +42,10 @@ export class QuickJSIterator
42
this.owner = context.runtime
43
}
44
45
+ [Symbol.iterator]() {
46
+ return this
47
+ }
48
+
49
next(value?: QuickJSHandle): IteratorResult<ContextResult<QuickJSHandle>, any> {
50
if (!this.alive || this._isDone) {
51
return {
0 commit comments