Skip to content

Commit c206a5e

Browse files
minor cleanup
1 parent eef391d commit c206a5e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/governor.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ export abstract class Governor {
1818
}
1919

2020
wrapIterator<T>(iter: Iterator<T> | AsyncIterator<T>): AsyncIterator<T> {
21-
const _this = this;
2221
return {
23-
next: async function(n) {
24-
return await _this.wrap(iter.next as Iterator<T>['next']).call(iter, n);
25-
},
22+
next: async (n) =>
23+
await this.wrap(iter.next as Iterator<T>['next']).call(iter, n)
24+
,
2625
return: async () =>
2726
typeof iter.return === "function"
2827
? iter.return()

0 commit comments

Comments
 (0)