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 eef391d commit c206a5eCopy full SHA for c206a5e
src/governor.ts
@@ -18,11 +18,10 @@ export abstract class Governor {
18
}
19
20
wrapIterator<T>(iter: Iterator<T> | AsyncIterator<T>): AsyncIterator<T> {
21
- const _this = this;
22
return {
23
- next: async function(n) {
24
- return await _this.wrap(iter.next as Iterator<T>['next']).call(iter, n);
25
- },
+ next: async (n) =>
+ await this.wrap(iter.next as Iterator<T>['next']).call(iter, n)
+ ,
26
return: async () =>
27
typeof iter.return === "function"
28
? iter.return()
0 commit comments