1
- import type { ContextResult , QuickJSContext } from "./context"
1
+ import type { QuickJSContextResult , QuickJSContext } from "./context"
2
2
import { DisposableResult , Lifetime , UsingDisposable } from "./lifetime"
3
3
import type { QuickJSRuntime } from "./runtime"
4
4
import type { QuickJSHandle } from "./types"
@@ -28,7 +28,7 @@ import type { QuickJSHandle } from "./types"
28
28
*/
29
29
export class QuickJSIterator
30
30
extends UsingDisposable
31
- implements Disposable , IterableIterator < ContextResult < QuickJSHandle > >
31
+ implements Disposable , IterableIterator < QuickJSContextResult < QuickJSHandle > >
32
32
{
33
33
public owner : QuickJSRuntime
34
34
private _next : QuickJSHandle | undefined
@@ -46,7 +46,7 @@ export class QuickJSIterator
46
46
return this
47
47
}
48
48
49
- next ( value ?: QuickJSHandle ) : IteratorResult < ContextResult < QuickJSHandle > , any > {
49
+ next ( value ?: QuickJSHandle ) : IteratorResult < QuickJSContextResult < QuickJSHandle > , any > {
50
50
if ( ! this . alive || this . _isDone ) {
51
51
return {
52
52
done : true ,
@@ -58,7 +58,7 @@ export class QuickJSIterator
58
58
return this . callIteratorMethod ( nextMethod , value )
59
59
}
60
60
61
- return ( value ?: QuickJSHandle ) : IteratorResult < ContextResult < QuickJSHandle > , any > {
61
+ return ( value ?: QuickJSHandle ) : IteratorResult < QuickJSContextResult < QuickJSHandle > , any > {
62
62
if ( ! this . alive ) {
63
63
return {
64
64
done : true ,
@@ -84,7 +84,7 @@ export class QuickJSIterator
84
84
return result
85
85
}
86
86
87
- throw ( e ?: any ) : IteratorResult < ContextResult < QuickJSHandle > , any > {
87
+ throw ( e ?: any ) : IteratorResult < QuickJSContextResult < QuickJSHandle > , any > {
88
88
if ( ! this . alive ) {
89
89
return {
90
90
done : true ,
@@ -116,7 +116,7 @@ export class QuickJSIterator
116
116
private callIteratorMethod (
117
117
method : QuickJSHandle ,
118
118
input ?: QuickJSHandle ,
119
- ) : IteratorResult < ContextResult < QuickJSHandle > , any > {
119
+ ) : IteratorResult < QuickJSContextResult < QuickJSHandle > , any > {
120
120
const callResult = input
121
121
? this . context . callFunction ( method , this . handle , input )
122
122
: this . context . callFunction ( method , this . handle )
0 commit comments