Re: [whatwg/streams] add @@asyncIterator to ReadableStreamDefaultReader (#950)

TimothyGu commented on this pull request.



> +    const reader = O._reader;
+    const read = reader.read;
+    return read.call(reader);
+  },
+  return() {
+    const O = this;
+    if (typeof O !== 'object') {
+      throw new TypeError();
+    }
+    if (O._cancel === true) {
+      const reader = O._reader;
+      const cancel = reader.cancel;
+      cancel.call(reader);
+    }
+  }
+}, Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype));

See https://github.com/whatwg/streams/pull/950#discussion_r211716722.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/950#discussion_r211718345

Received on Tuesday, 21 August 2018 18:49:00 UTC