summaryrefslogtreecommitdiff
path: root/cli/js/net.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2020-04-15 11:44:09 +0100
committerGitHub <noreply@github.com>2020-04-15 12:44:09 +0200
commit95eb6d780c2790b524dc3ad6f21958260c2dadfe (patch)
treee73154e4f7a398a9cbae8da484a59da68b2e212a /cli/js/net.ts
parent263dc8f5fe09e57437d073429cc0fa1753362f06 (diff)
fix(cli/js/net): Make generator return types iterable (#4661)
Diffstat (limited to 'cli/js/net.ts')
-rw-r--r--cli/js/net.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/net.ts b/cli/js/net.ts
index 7c0edf1f3..92fdfe3ac 100644
--- a/cli/js/net.ts
+++ b/cli/js/net.ts
@@ -16,7 +16,7 @@ export interface DatagramConn extends AsyncIterable<[Uint8Array, Addr]> {
addr: Addr;
- [Symbol.asyncIterator](): AsyncIterator<[Uint8Array, Addr]>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<[Uint8Array, Addr]>;
}
export interface Listener extends AsyncIterable<Conn> {
@@ -26,7 +26,7 @@ export interface Listener extends AsyncIterable<Conn> {
addr: Addr;
- [Symbol.asyncIterator](): AsyncIterator<Conn>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<Conn>;
}
export class ConnImpl implements Conn {
@@ -69,7 +69,7 @@ export class ListenerImpl implements Listener {
close(this.rid);
}
- async *[Symbol.asyncIterator](): AsyncIterator<Conn> {
+ async *[Symbol.asyncIterator](): AsyncIterableIterator<Conn> {
while (true) {
try {
yield await this.accept();
@@ -112,7 +112,7 @@ export class DatagramImpl implements DatagramConn {
close(this.rid);
}
- async *[Symbol.asyncIterator](): AsyncIterator<[Uint8Array, Addr]> {
+ async *[Symbol.asyncIterator](): AsyncIterableIterator<[Uint8Array, Addr]> {
while (true) {
try {
yield await this.receive();