11cb0ef41Sopenharmony_ci{
21cb0ef41Sopenharmony_ci  "type": "module",
31cb0ef41Sopenharmony_ci  "source": "doc/api/webstreams.md",
41cb0ef41Sopenharmony_ci  "modules": [
51cb0ef41Sopenharmony_ci    {
61cb0ef41Sopenharmony_ci      "textRaw": "Web Streams API",
71cb0ef41Sopenharmony_ci      "name": "web_streams_api",
81cb0ef41Sopenharmony_ci      "introduced_in": "v16.5.0",
91cb0ef41Sopenharmony_ci      "meta": {
101cb0ef41Sopenharmony_ci        "added": [
111cb0ef41Sopenharmony_ci          "v16.5.0"
121cb0ef41Sopenharmony_ci        ],
131cb0ef41Sopenharmony_ci        "changes": [
141cb0ef41Sopenharmony_ci          {
151cb0ef41Sopenharmony_ci            "version": "v18.0.0",
161cb0ef41Sopenharmony_ci            "pr-url": "https://github.com/nodejs/node/pull/42225",
171cb0ef41Sopenharmony_ci            "description": "Use of this API no longer emit a runtime warning."
181cb0ef41Sopenharmony_ci          }
191cb0ef41Sopenharmony_ci        ]
201cb0ef41Sopenharmony_ci      },
211cb0ef41Sopenharmony_ci      "stability": 1,
221cb0ef41Sopenharmony_ci      "stabilityText": "Experimental.",
231cb0ef41Sopenharmony_ci      "desc": "<p>An implementation of the <a href=\"https://streams.spec.whatwg.org/\">WHATWG Streams Standard</a>.</p>",
241cb0ef41Sopenharmony_ci      "modules": [
251cb0ef41Sopenharmony_ci        {
261cb0ef41Sopenharmony_ci          "textRaw": "Overview",
271cb0ef41Sopenharmony_ci          "name": "overview",
281cb0ef41Sopenharmony_ci          "desc": "<p>The <a href=\"https://streams.spec.whatwg.org/\">WHATWG Streams Standard</a> (or \"web streams\") defines an API for handling\nstreaming data. It is similar to the Node.js <a href=\"stream.html\">Streams</a> API but emerged later\nand has become the \"standard\" API for streaming data across many JavaScript\nenvironments.</p>\n<p>There are three primary types of objects:</p>\n<ul>\n<li><code>ReadableStream</code> - Represents a source of streaming data.</li>\n<li><code>WritableStream</code> - Represents a destination for streaming data.</li>\n<li><code>TransformStream</code> - Represents an algorithm for transforming streaming data.</li>\n</ul>\n<h3>Example <code>ReadableStream</code></h3>\n<p>This example creates a simple <code>ReadableStream</code> that pushes the current\n<code>performance.now()</code> timestamp once every second forever. An async iterable\nis used to read the data from the stream.</p>\n<pre><code class=\"language-mjs\">import {\n  ReadableStream,\n} from 'node:stream/web';\n\nimport {\n  setInterval as every,\n} from 'node:timers/promises';\n\nimport {\n  performance,\n} from 'node:perf_hooks';\n\nconst SECOND = 1000;\n\nconst stream = new ReadableStream({\n  async start(controller) {\n    for await (const _ of every(SECOND))\n      controller.enqueue(performance.now());\n  },\n});\n\nfor await (const value of stream)\n  console.log(value);\n</code></pre>\n<pre><code class=\"language-cjs\">const {\n  ReadableStream,\n} = require('node:stream/web');\n\nconst {\n  setInterval: every,\n} = require('node:timers/promises');\n\nconst {\n  performance,\n} = require('node:perf_hooks');\n\nconst SECOND = 1000;\n\nconst stream = new ReadableStream({\n  async start(controller) {\n    for await (const _ of every(SECOND))\n      controller.enqueue(performance.now());\n  },\n});\n\n(async () => {\n  for await (const value of stream)\n    console.log(value);\n})();\n</code></pre>",
291cb0ef41Sopenharmony_ci          "type": "module",
301cb0ef41Sopenharmony_ci          "displayName": "Overview"
311cb0ef41Sopenharmony_ci        },
321cb0ef41Sopenharmony_ci        {
331cb0ef41Sopenharmony_ci          "textRaw": "API",
341cb0ef41Sopenharmony_ci          "name": "api",
351cb0ef41Sopenharmony_ci          "classes": [
361cb0ef41Sopenharmony_ci            {
371cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableStream`",
381cb0ef41Sopenharmony_ci              "type": "class",
391cb0ef41Sopenharmony_ci              "name": "ReadableStream",
401cb0ef41Sopenharmony_ci              "meta": {
411cb0ef41Sopenharmony_ci                "added": [
421cb0ef41Sopenharmony_ci                  "v16.5.0"
431cb0ef41Sopenharmony_ci                ],
441cb0ef41Sopenharmony_ci                "changes": [
451cb0ef41Sopenharmony_ci                  {
461cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
471cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
481cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
491cb0ef41Sopenharmony_ci                  }
501cb0ef41Sopenharmony_ci                ]
511cb0ef41Sopenharmony_ci              },
521cb0ef41Sopenharmony_ci              "properties": [
531cb0ef41Sopenharmony_ci                {
541cb0ef41Sopenharmony_ci                  "textRaw": "`locked` Type: {boolean} Set to `true` if there is an active reader for this {ReadableStream}.",
551cb0ef41Sopenharmony_ci                  "type": "boolean",
561cb0ef41Sopenharmony_ci                  "name": "Type",
571cb0ef41Sopenharmony_ci                  "meta": {
581cb0ef41Sopenharmony_ci                    "added": [
591cb0ef41Sopenharmony_ci                      "v16.5.0"
601cb0ef41Sopenharmony_ci                    ],
611cb0ef41Sopenharmony_ci                    "changes": []
621cb0ef41Sopenharmony_ci                  },
631cb0ef41Sopenharmony_ci                  "desc": "<p>The <code>readableStream.locked</code> property is <code>false</code> by default, and is\nswitched to <code>true</code> while there is an active reader consuming the\nstream's data.</p>",
641cb0ef41Sopenharmony_ci                  "shortDesc": "Set to `true` if there is an active reader for this {ReadableStream}."
651cb0ef41Sopenharmony_ci                }
661cb0ef41Sopenharmony_ci              ],
671cb0ef41Sopenharmony_ci              "methods": [
681cb0ef41Sopenharmony_ci                {
691cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.cancel([reason])`",
701cb0ef41Sopenharmony_ci                  "type": "method",
711cb0ef41Sopenharmony_ci                  "name": "cancel",
721cb0ef41Sopenharmony_ci                  "meta": {
731cb0ef41Sopenharmony_ci                    "added": [
741cb0ef41Sopenharmony_ci                      "v16.5.0"
751cb0ef41Sopenharmony_ci                    ],
761cb0ef41Sopenharmony_ci                    "changes": []
771cb0ef41Sopenharmony_ci                  },
781cb0ef41Sopenharmony_ci                  "signatures": [
791cb0ef41Sopenharmony_ci                    {
801cb0ef41Sopenharmony_ci                      "return": {
811cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined` once cancelation has been completed.",
821cb0ef41Sopenharmony_ci                        "name": "return",
831cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined` once cancelation has been completed."
841cb0ef41Sopenharmony_ci                      },
851cb0ef41Sopenharmony_ci                      "params": [
861cb0ef41Sopenharmony_ci                        {
871cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
881cb0ef41Sopenharmony_ci                          "name": "reason",
891cb0ef41Sopenharmony_ci                          "type": "any"
901cb0ef41Sopenharmony_ci                        }
911cb0ef41Sopenharmony_ci                      ]
921cb0ef41Sopenharmony_ci                    }
931cb0ef41Sopenharmony_ci                  ]
941cb0ef41Sopenharmony_ci                },
951cb0ef41Sopenharmony_ci                {
961cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.getReader([options])`",
971cb0ef41Sopenharmony_ci                  "type": "method",
981cb0ef41Sopenharmony_ci                  "name": "getReader",
991cb0ef41Sopenharmony_ci                  "meta": {
1001cb0ef41Sopenharmony_ci                    "added": [
1011cb0ef41Sopenharmony_ci                      "v16.5.0"
1021cb0ef41Sopenharmony_ci                    ],
1031cb0ef41Sopenharmony_ci                    "changes": []
1041cb0ef41Sopenharmony_ci                  },
1051cb0ef41Sopenharmony_ci                  "signatures": [
1061cb0ef41Sopenharmony_ci                    {
1071cb0ef41Sopenharmony_ci                      "return": {
1081cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {ReadableStreamDefaultReader|ReadableStreamBYOBReader}",
1091cb0ef41Sopenharmony_ci                        "name": "return",
1101cb0ef41Sopenharmony_ci                        "type": "ReadableStreamDefaultReader|ReadableStreamBYOBReader"
1111cb0ef41Sopenharmony_ci                      },
1121cb0ef41Sopenharmony_ci                      "params": [
1131cb0ef41Sopenharmony_ci                        {
1141cb0ef41Sopenharmony_ci                          "textRaw": "`options` {Object}",
1151cb0ef41Sopenharmony_ci                          "name": "options",
1161cb0ef41Sopenharmony_ci                          "type": "Object",
1171cb0ef41Sopenharmony_ci                          "options": [
1181cb0ef41Sopenharmony_ci                            {
1191cb0ef41Sopenharmony_ci                              "textRaw": "`mode` {string} `'byob'` or `undefined`",
1201cb0ef41Sopenharmony_ci                              "name": "mode",
1211cb0ef41Sopenharmony_ci                              "type": "string",
1221cb0ef41Sopenharmony_ci                              "desc": "`'byob'` or `undefined`"
1231cb0ef41Sopenharmony_ci                            }
1241cb0ef41Sopenharmony_ci                          ]
1251cb0ef41Sopenharmony_ci                        }
1261cb0ef41Sopenharmony_ci                      ]
1271cb0ef41Sopenharmony_ci                    }
1281cb0ef41Sopenharmony_ci                  ],
1291cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { ReadableStream } from 'node:stream/web';\n\nconst stream = new ReadableStream();\n\nconst reader = stream.getReader();\n\nconsole.log(await reader.read());\n</code></pre>\n<pre><code class=\"language-cjs\">const { ReadableStream } = require('node:stream/web');\n\nconst stream = new ReadableStream();\n\nconst reader = stream.getReader();\n\nreader.read().then(console.log);\n</code></pre>\n<p>Causes the <code>readableStream.locked</code> to be <code>true</code>.</p>"
1301cb0ef41Sopenharmony_ci                },
1311cb0ef41Sopenharmony_ci                {
1321cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.pipeThrough(transform[, options])`",
1331cb0ef41Sopenharmony_ci                  "type": "method",
1341cb0ef41Sopenharmony_ci                  "name": "pipeThrough",
1351cb0ef41Sopenharmony_ci                  "meta": {
1361cb0ef41Sopenharmony_ci                    "added": [
1371cb0ef41Sopenharmony_ci                      "v16.5.0"
1381cb0ef41Sopenharmony_ci                    ],
1391cb0ef41Sopenharmony_ci                    "changes": []
1401cb0ef41Sopenharmony_ci                  },
1411cb0ef41Sopenharmony_ci                  "signatures": [
1421cb0ef41Sopenharmony_ci                    {
1431cb0ef41Sopenharmony_ci                      "return": {
1441cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {ReadableStream} From `transform.readable`.",
1451cb0ef41Sopenharmony_ci                        "name": "return",
1461cb0ef41Sopenharmony_ci                        "type": "ReadableStream",
1471cb0ef41Sopenharmony_ci                        "desc": "From `transform.readable`."
1481cb0ef41Sopenharmony_ci                      },
1491cb0ef41Sopenharmony_ci                      "params": [
1501cb0ef41Sopenharmony_ci                        {
1511cb0ef41Sopenharmony_ci                          "textRaw": "`transform` {Object}",
1521cb0ef41Sopenharmony_ci                          "name": "transform",
1531cb0ef41Sopenharmony_ci                          "type": "Object",
1541cb0ef41Sopenharmony_ci                          "options": [
1551cb0ef41Sopenharmony_ci                            {
1561cb0ef41Sopenharmony_ci                              "textRaw": "`readable` {ReadableStream} The `ReadableStream` to which `transform.writable` will push the potentially modified data is receives from this `ReadableStream`.",
1571cb0ef41Sopenharmony_ci                              "name": "readable",
1581cb0ef41Sopenharmony_ci                              "type": "ReadableStream",
1591cb0ef41Sopenharmony_ci                              "desc": "The `ReadableStream` to which `transform.writable` will push the potentially modified data is receives from this `ReadableStream`."
1601cb0ef41Sopenharmony_ci                            },
1611cb0ef41Sopenharmony_ci                            {
1621cb0ef41Sopenharmony_ci                              "textRaw": "`writable` {WritableStream} The `WritableStream` to which this `ReadableStream`'s data will be written.",
1631cb0ef41Sopenharmony_ci                              "name": "writable",
1641cb0ef41Sopenharmony_ci                              "type": "WritableStream",
1651cb0ef41Sopenharmony_ci                              "desc": "The `WritableStream` to which this `ReadableStream`'s data will be written."
1661cb0ef41Sopenharmony_ci                            }
1671cb0ef41Sopenharmony_ci                          ]
1681cb0ef41Sopenharmony_ci                        },
1691cb0ef41Sopenharmony_ci                        {
1701cb0ef41Sopenharmony_ci                          "textRaw": "`options` {Object}",
1711cb0ef41Sopenharmony_ci                          "name": "options",
1721cb0ef41Sopenharmony_ci                          "type": "Object",
1731cb0ef41Sopenharmony_ci                          "options": [
1741cb0ef41Sopenharmony_ci                            {
1751cb0ef41Sopenharmony_ci                              "textRaw": "`preventAbort` {boolean} When `true`, errors in this `ReadableStream` will not cause `transform.writable` to be aborted.",
1761cb0ef41Sopenharmony_ci                              "name": "preventAbort",
1771cb0ef41Sopenharmony_ci                              "type": "boolean",
1781cb0ef41Sopenharmony_ci                              "desc": "When `true`, errors in this `ReadableStream` will not cause `transform.writable` to be aborted."
1791cb0ef41Sopenharmony_ci                            },
1801cb0ef41Sopenharmony_ci                            {
1811cb0ef41Sopenharmony_ci                              "textRaw": "`preventCancel` {boolean} When `true`, errors in the destination `transform.writable` do not cause this `ReadableStream` to be canceled.",
1821cb0ef41Sopenharmony_ci                              "name": "preventCancel",
1831cb0ef41Sopenharmony_ci                              "type": "boolean",
1841cb0ef41Sopenharmony_ci                              "desc": "When `true`, errors in the destination `transform.writable` do not cause this `ReadableStream` to be canceled."
1851cb0ef41Sopenharmony_ci                            },
1861cb0ef41Sopenharmony_ci                            {
1871cb0ef41Sopenharmony_ci                              "textRaw": "`preventClose` {boolean} When `true`, closing this `ReadableStream` does not cause `transform.writable` to be closed.",
1881cb0ef41Sopenharmony_ci                              "name": "preventClose",
1891cb0ef41Sopenharmony_ci                              "type": "boolean",
1901cb0ef41Sopenharmony_ci                              "desc": "When `true`, closing this `ReadableStream` does not cause `transform.writable` to be closed."
1911cb0ef41Sopenharmony_ci                            },
1921cb0ef41Sopenharmony_ci                            {
1931cb0ef41Sopenharmony_ci                              "textRaw": "`signal` {AbortSignal} Allows the transfer of data to be canceled using an {AbortController}.",
1941cb0ef41Sopenharmony_ci                              "name": "signal",
1951cb0ef41Sopenharmony_ci                              "type": "AbortSignal",
1961cb0ef41Sopenharmony_ci                              "desc": "Allows the transfer of data to be canceled using an {AbortController}."
1971cb0ef41Sopenharmony_ci                            }
1981cb0ef41Sopenharmony_ci                          ]
1991cb0ef41Sopenharmony_ci                        }
2001cb0ef41Sopenharmony_ci                      ]
2011cb0ef41Sopenharmony_ci                    }
2021cb0ef41Sopenharmony_ci                  ],
2031cb0ef41Sopenharmony_ci                  "desc": "<p>Connects this <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to the pair of <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> and\n<a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a> provided in the <code>transform</code> argument such that the\ndata from this <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> is written in to <code>transform.writable</code>,\npossibly transformed, then pushed to <code>transform.readable</code>. Once the\npipeline is configured, <code>transform.readable</code> is returned.</p>\n<p>Causes the <code>readableStream.locked</code> to be <code>true</code> while the pipe operation\nis active.</p>\n<pre><code class=\"language-mjs\">import {\n  ReadableStream,\n  TransformStream,\n} from 'node:stream/web';\n\nconst stream = new ReadableStream({\n  start(controller) {\n    controller.enqueue('a');\n  },\n});\n\nconst transform = new TransformStream({\n  transform(chunk, controller) {\n    controller.enqueue(chunk.toUpperCase());\n  },\n});\n\nconst transformedStream = stream.pipeThrough(transform);\n\nfor await (const chunk of transformedStream)\n  console.log(chunk);\n</code></pre>\n<pre><code class=\"language-cjs\">const {\n  ReadableStream,\n  TransformStream,\n} = require('node:stream/web');\n\nconst stream = new ReadableStream({\n  start(controller) {\n    controller.enqueue('a');\n  },\n});\n\nconst transform = new TransformStream({\n  transform(chunk, controller) {\n    controller.enqueue(chunk.toUpperCase());\n  },\n});\n\nconst transformedStream = stream.pipeThrough(transform);\n\n(async () => {\n  for await (const chunk of transformedStream)\n    console.log(chunk);\n})();\n</code></pre>"
2041cb0ef41Sopenharmony_ci                },
2051cb0ef41Sopenharmony_ci                {
2061cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.pipeTo(destination[, options])`",
2071cb0ef41Sopenharmony_ci                  "type": "method",
2081cb0ef41Sopenharmony_ci                  "name": "pipeTo",
2091cb0ef41Sopenharmony_ci                  "meta": {
2101cb0ef41Sopenharmony_ci                    "added": [
2111cb0ef41Sopenharmony_ci                      "v16.5.0"
2121cb0ef41Sopenharmony_ci                    ],
2131cb0ef41Sopenharmony_ci                    "changes": []
2141cb0ef41Sopenharmony_ci                  },
2151cb0ef41Sopenharmony_ci                  "signatures": [
2161cb0ef41Sopenharmony_ci                    {
2171cb0ef41Sopenharmony_ci                      "return": {
2181cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`",
2191cb0ef41Sopenharmony_ci                        "name": "return",
2201cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`"
2211cb0ef41Sopenharmony_ci                      },
2221cb0ef41Sopenharmony_ci                      "params": [
2231cb0ef41Sopenharmony_ci                        {
2241cb0ef41Sopenharmony_ci                          "textRaw": "`destination` {WritableStream} A {WritableStream} to which this `ReadableStream`'s data will be written.",
2251cb0ef41Sopenharmony_ci                          "name": "destination",
2261cb0ef41Sopenharmony_ci                          "type": "WritableStream",
2271cb0ef41Sopenharmony_ci                          "desc": "A {WritableStream} to which this `ReadableStream`'s data will be written."
2281cb0ef41Sopenharmony_ci                        },
2291cb0ef41Sopenharmony_ci                        {
2301cb0ef41Sopenharmony_ci                          "textRaw": "`options` {Object}",
2311cb0ef41Sopenharmony_ci                          "name": "options",
2321cb0ef41Sopenharmony_ci                          "type": "Object",
2331cb0ef41Sopenharmony_ci                          "options": [
2341cb0ef41Sopenharmony_ci                            {
2351cb0ef41Sopenharmony_ci                              "textRaw": "`preventAbort` {boolean} When `true`, errors in this `ReadableStream` will not cause `destination` to be aborted.",
2361cb0ef41Sopenharmony_ci                              "name": "preventAbort",
2371cb0ef41Sopenharmony_ci                              "type": "boolean",
2381cb0ef41Sopenharmony_ci                              "desc": "When `true`, errors in this `ReadableStream` will not cause `destination` to be aborted."
2391cb0ef41Sopenharmony_ci                            },
2401cb0ef41Sopenharmony_ci                            {
2411cb0ef41Sopenharmony_ci                              "textRaw": "`preventCancel` {boolean} When `true`, errors in the `destination` will not cause this `ReadableStream` to be canceled.",
2421cb0ef41Sopenharmony_ci                              "name": "preventCancel",
2431cb0ef41Sopenharmony_ci                              "type": "boolean",
2441cb0ef41Sopenharmony_ci                              "desc": "When `true`, errors in the `destination` will not cause this `ReadableStream` to be canceled."
2451cb0ef41Sopenharmony_ci                            },
2461cb0ef41Sopenharmony_ci                            {
2471cb0ef41Sopenharmony_ci                              "textRaw": "`preventClose` {boolean} When `true`, closing this `ReadableStream` does not cause `destination` to be closed.",
2481cb0ef41Sopenharmony_ci                              "name": "preventClose",
2491cb0ef41Sopenharmony_ci                              "type": "boolean",
2501cb0ef41Sopenharmony_ci                              "desc": "When `true`, closing this `ReadableStream` does not cause `destination` to be closed."
2511cb0ef41Sopenharmony_ci                            },
2521cb0ef41Sopenharmony_ci                            {
2531cb0ef41Sopenharmony_ci                              "textRaw": "`signal` {AbortSignal} Allows the transfer of data to be canceled using an {AbortController}.",
2541cb0ef41Sopenharmony_ci                              "name": "signal",
2551cb0ef41Sopenharmony_ci                              "type": "AbortSignal",
2561cb0ef41Sopenharmony_ci                              "desc": "Allows the transfer of data to be canceled using an {AbortController}."
2571cb0ef41Sopenharmony_ci                            }
2581cb0ef41Sopenharmony_ci                          ]
2591cb0ef41Sopenharmony_ci                        }
2601cb0ef41Sopenharmony_ci                      ]
2611cb0ef41Sopenharmony_ci                    }
2621cb0ef41Sopenharmony_ci                  ],
2631cb0ef41Sopenharmony_ci                  "desc": "<p>Causes the <code>readableStream.locked</code> to be <code>true</code> while the pipe operation\nis active.</p>"
2641cb0ef41Sopenharmony_ci                },
2651cb0ef41Sopenharmony_ci                {
2661cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.tee()`",
2671cb0ef41Sopenharmony_ci                  "type": "method",
2681cb0ef41Sopenharmony_ci                  "name": "tee",
2691cb0ef41Sopenharmony_ci                  "meta": {
2701cb0ef41Sopenharmony_ci                    "added": [
2711cb0ef41Sopenharmony_ci                      "v16.5.0"
2721cb0ef41Sopenharmony_ci                    ],
2731cb0ef41Sopenharmony_ci                    "changes": [
2741cb0ef41Sopenharmony_ci                      {
2751cb0ef41Sopenharmony_ci                        "version": "v18.10.0",
2761cb0ef41Sopenharmony_ci                        "pr-url": "https://github.com/nodejs/node/pull/44505",
2771cb0ef41Sopenharmony_ci                        "description": "Support teeing a readable byte stream."
2781cb0ef41Sopenharmony_ci                      }
2791cb0ef41Sopenharmony_ci                    ]
2801cb0ef41Sopenharmony_ci                  },
2811cb0ef41Sopenharmony_ci                  "signatures": [
2821cb0ef41Sopenharmony_ci                    {
2831cb0ef41Sopenharmony_ci                      "return": {
2841cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {ReadableStream\\[]}",
2851cb0ef41Sopenharmony_ci                        "name": "return",
2861cb0ef41Sopenharmony_ci                        "type": "ReadableStream\\[]"
2871cb0ef41Sopenharmony_ci                      },
2881cb0ef41Sopenharmony_ci                      "params": []
2891cb0ef41Sopenharmony_ci                    }
2901cb0ef41Sopenharmony_ci                  ],
2911cb0ef41Sopenharmony_ci                  "desc": "<p>Returns a pair of new <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> instances to which this\n<code>ReadableStream</code>'s data will be forwarded. Each will receive the\nsame data.</p>\n<p>Causes the <code>readableStream.locked</code> to be <code>true</code>.</p>"
2921cb0ef41Sopenharmony_ci                },
2931cb0ef41Sopenharmony_ci                {
2941cb0ef41Sopenharmony_ci                  "textRaw": "`readableStream.values([options])`",
2951cb0ef41Sopenharmony_ci                  "type": "method",
2961cb0ef41Sopenharmony_ci                  "name": "values",
2971cb0ef41Sopenharmony_ci                  "meta": {
2981cb0ef41Sopenharmony_ci                    "added": [
2991cb0ef41Sopenharmony_ci                      "v16.5.0"
3001cb0ef41Sopenharmony_ci                    ],
3011cb0ef41Sopenharmony_ci                    "changes": []
3021cb0ef41Sopenharmony_ci                  },
3031cb0ef41Sopenharmony_ci                  "signatures": [
3041cb0ef41Sopenharmony_ci                    {
3051cb0ef41Sopenharmony_ci                      "params": [
3061cb0ef41Sopenharmony_ci                        {
3071cb0ef41Sopenharmony_ci                          "textRaw": "`options` {Object}",
3081cb0ef41Sopenharmony_ci                          "name": "options",
3091cb0ef41Sopenharmony_ci                          "type": "Object",
3101cb0ef41Sopenharmony_ci                          "options": [
3111cb0ef41Sopenharmony_ci                            {
3121cb0ef41Sopenharmony_ci                              "textRaw": "`preventCancel` {boolean} When `true`, prevents the {ReadableStream} from being closed when the async iterator abruptly terminates. **Default**: `false`.",
3131cb0ef41Sopenharmony_ci                              "name": "preventCancel",
3141cb0ef41Sopenharmony_ci                              "type": "boolean",
3151cb0ef41Sopenharmony_ci                              "desc": "When `true`, prevents the {ReadableStream} from being closed when the async iterator abruptly terminates. **Default**: `false`."
3161cb0ef41Sopenharmony_ci                            }
3171cb0ef41Sopenharmony_ci                          ]
3181cb0ef41Sopenharmony_ci                        }
3191cb0ef41Sopenharmony_ci                      ]
3201cb0ef41Sopenharmony_ci                    }
3211cb0ef41Sopenharmony_ci                  ],
3221cb0ef41Sopenharmony_ci                  "desc": "<p>Creates and returns an async iterator usable for consuming this\n<code>ReadableStream</code>'s data.</p>\n<p>Causes the <code>readableStream.locked</code> to be <code>true</code> while the async iterator\nis active.</p>\n<pre><code class=\"language-mjs\">import { Buffer } from 'node:buffer';\n\nconst stream = new ReadableStream(getSomeSource());\n\nfor await (const chunk of stream.values({ preventCancel: true }))\n  console.log(Buffer.from(chunk).toString());\n</code></pre>"
3231cb0ef41Sopenharmony_ci                }
3241cb0ef41Sopenharmony_ci              ],
3251cb0ef41Sopenharmony_ci              "modules": [
3261cb0ef41Sopenharmony_ci                {
3271cb0ef41Sopenharmony_ci                  "textRaw": "Async Iteration",
3281cb0ef41Sopenharmony_ci                  "name": "async_iteration",
3291cb0ef41Sopenharmony_ci                  "desc": "<p>The <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> object supports the async iterator protocol using\n<code>for await</code> syntax.</p>\n<pre><code class=\"language-mjs\">import { Buffer } from 'node:buffer';\n\nconst stream = new ReadableStream(getSomeSource());\n\nfor await (const chunk of stream)\n  console.log(Buffer.from(chunk).toString());\n</code></pre>\n<p>The async iterator will consume the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> until it terminates.</p>\n<p>By default, if the async iterator exits early (via either a <code>break</code>,\n<code>return</code>, or a <code>throw</code>), the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> will be closed. To prevent\nautomatic closing of the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>, use the <code>readableStream.values()</code>\nmethod to acquire the async iterator and set the <code>preventCancel</code> option to\n<code>true</code>.</p>\n<p>The <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> must not be locked (that is, it must not have an existing\nactive reader). During the async iteration, the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> will be locked.</p>",
3301cb0ef41Sopenharmony_ci                  "type": "module",
3311cb0ef41Sopenharmony_ci                  "displayName": "Async Iteration"
3321cb0ef41Sopenharmony_ci                },
3331cb0ef41Sopenharmony_ci                {
3341cb0ef41Sopenharmony_ci                  "textRaw": "Transferring with `postMessage()`",
3351cb0ef41Sopenharmony_ci                  "name": "transferring_with_`postmessage()`",
3361cb0ef41Sopenharmony_ci                  "desc": "<p>A <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> instance can be transferred using a <a href=\"worker_threads.html#class-messageport\" class=\"type\">&lt;MessagePort&gt;</a>.</p>\n<pre><code class=\"language-js\">const stream = new ReadableStream(getReadableSourceSomehow());\n\nconst { port1, port2 } = new MessageChannel();\n\nport1.onmessage = ({ data }) => {\n  data.getReader().read().then((chunk) => {\n    console.log(chunk);\n  });\n};\n\nport2.postMessage(stream, [stream]);\n</code></pre>",
3371cb0ef41Sopenharmony_ci                  "type": "module",
3381cb0ef41Sopenharmony_ci                  "displayName": "Transferring with `postMessage()`"
3391cb0ef41Sopenharmony_ci                }
3401cb0ef41Sopenharmony_ci              ],
3411cb0ef41Sopenharmony_ci              "signatures": [
3421cb0ef41Sopenharmony_ci                {
3431cb0ef41Sopenharmony_ci                  "params": [],
3441cb0ef41Sopenharmony_ci                  "desc": "<!--lint disable maximum-line-length remark-lint-->\n<ul>\n<li><code>underlyingSource</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\" class=\"type\">&lt;Object&gt;</a>\n<ul>\n<li><code>start</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\" class=\"type\">&lt;Function&gt;</a> A user-defined function that is invoked immediately when\nthe <code>ReadableStream</code> is created.\n<ul>\n<li><code>controller</code> <a href=\"webstreams.html#class-readablestreamdefaultcontroller\" class=\"type\">&lt;ReadableStreamDefaultController&gt;</a> | <a href=\"webstreams.html#class-readablebytestreamcontroller\" class=\"type\">&lt;ReadableByteStreamController&gt;</a></li>\n<li>Returns: <code>undefined</code> or a promise fulfilled with <code>undefined</code>.</li>\n</ul>\n</li>\n<li><code>pull</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\" class=\"type\">&lt;Function&gt;</a> A user-defined function that is called repeatedly when the\n<code>ReadableStream</code> internal queue is not full. The operation may be sync or\nasync. If async, the function will not be called again until the previously\nreturned promise is fulfilled.\n<ul>\n<li><code>controller</code> <a href=\"webstreams.html#class-readablestreamdefaultcontroller\" class=\"type\">&lt;ReadableStreamDefaultController&gt;</a> | <a href=\"webstreams.html#class-readablebytestreamcontroller\" class=\"type\">&lt;ReadableByteStreamController&gt;</a></li>\n<li>Returns: A promise fulfilled with <code>undefined</code>.</li>\n</ul>\n</li>\n<li><code>cancel</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\" class=\"type\">&lt;Function&gt;</a> A user-defined function that is called when the\n<code>ReadableStream</code> is canceled.\n<ul>\n<li><code>reason</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types\" class=\"type\">&lt;any&gt;</a></li>\n<li>Returns: A promise fulfilled with <code>undefined</code>.</li>\n</ul>\n</li>\n<li><code>type</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a> Must be <code>'bytes'</code> or <code>undefined</code>.</li>\n<li><code>autoAllocateChunkSize</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\">&lt;number&gt;</a> Used only when <code>type</code> is equal to\n<code>'bytes'</code>. When set to a non-zero value a view buffer is automatically\nallocated to <code>ReadableByteStreamController.byobRequest</code>. When not set\none must use stream's internal queues to transfer data via the default\nreader <code>ReadableStreamDefaultReader</code>.</li>\n</ul>\n</li>\n<li><code>strategy</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\" class=\"type\">&lt;Object&gt;</a>\n<ul>\n<li><code>highWaterMark</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\">&lt;number&gt;</a> The maximum internal queue size before backpressure\nis applied.</li>\n<li><code>size</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\" class=\"type\">&lt;Function&gt;</a> A user-defined function used to identify the size of each\nchunk of data.\n<ul>\n<li><code>chunk</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types\" class=\"type\">&lt;any&gt;</a></li>\n<li>Returns: <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\" class=\"type\">&lt;number&gt;</a></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<!--lint enable maximum-line-length remark-lint-->"
3451cb0ef41Sopenharmony_ci                }
3461cb0ef41Sopenharmony_ci              ]
3471cb0ef41Sopenharmony_ci            },
3481cb0ef41Sopenharmony_ci            {
3491cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableStreamDefaultReader`",
3501cb0ef41Sopenharmony_ci              "type": "class",
3511cb0ef41Sopenharmony_ci              "name": "ReadableStreamDefaultReader",
3521cb0ef41Sopenharmony_ci              "meta": {
3531cb0ef41Sopenharmony_ci                "added": [
3541cb0ef41Sopenharmony_ci                  "v16.5.0"
3551cb0ef41Sopenharmony_ci                ],
3561cb0ef41Sopenharmony_ci                "changes": [
3571cb0ef41Sopenharmony_ci                  {
3581cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
3591cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
3601cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
3611cb0ef41Sopenharmony_ci                  }
3621cb0ef41Sopenharmony_ci                ]
3631cb0ef41Sopenharmony_ci              },
3641cb0ef41Sopenharmony_ci              "desc": "<p>By default, calling <code>readableStream.getReader()</code> with no arguments\nwill return an instance of <code>ReadableStreamDefaultReader</code>. The default\nreader treats the chunks of data passed through the stream as opaque\nvalues, which allows the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to work with generally any\nJavaScript value.</p>",
3651cb0ef41Sopenharmony_ci              "methods": [
3661cb0ef41Sopenharmony_ci                {
3671cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultReader.cancel([reason])`",
3681cb0ef41Sopenharmony_ci                  "type": "method",
3691cb0ef41Sopenharmony_ci                  "name": "cancel",
3701cb0ef41Sopenharmony_ci                  "meta": {
3711cb0ef41Sopenharmony_ci                    "added": [
3721cb0ef41Sopenharmony_ci                      "v16.5.0"
3731cb0ef41Sopenharmony_ci                    ],
3741cb0ef41Sopenharmony_ci                    "changes": []
3751cb0ef41Sopenharmony_ci                  },
3761cb0ef41Sopenharmony_ci                  "signatures": [
3771cb0ef41Sopenharmony_ci                    {
3781cb0ef41Sopenharmony_ci                      "return": {
3791cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
3801cb0ef41Sopenharmony_ci                        "name": "return",
3811cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
3821cb0ef41Sopenharmony_ci                      },
3831cb0ef41Sopenharmony_ci                      "params": [
3841cb0ef41Sopenharmony_ci                        {
3851cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
3861cb0ef41Sopenharmony_ci                          "name": "reason",
3871cb0ef41Sopenharmony_ci                          "type": "any"
3881cb0ef41Sopenharmony_ci                        }
3891cb0ef41Sopenharmony_ci                      ]
3901cb0ef41Sopenharmony_ci                    }
3911cb0ef41Sopenharmony_ci                  ],
3921cb0ef41Sopenharmony_ci                  "desc": "<p>Cancels the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> and returns a promise that is fulfilled\nwhen the underlying stream has been canceled.</p>"
3931cb0ef41Sopenharmony_ci                },
3941cb0ef41Sopenharmony_ci                {
3951cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultReader.read()`",
3961cb0ef41Sopenharmony_ci                  "type": "method",
3971cb0ef41Sopenharmony_ci                  "name": "read",
3981cb0ef41Sopenharmony_ci                  "meta": {
3991cb0ef41Sopenharmony_ci                    "added": [
4001cb0ef41Sopenharmony_ci                      "v16.5.0"
4011cb0ef41Sopenharmony_ci                    ],
4021cb0ef41Sopenharmony_ci                    "changes": []
4031cb0ef41Sopenharmony_ci                  },
4041cb0ef41Sopenharmony_ci                  "signatures": [
4051cb0ef41Sopenharmony_ci                    {
4061cb0ef41Sopenharmony_ci                      "return": {
4071cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with an object:",
4081cb0ef41Sopenharmony_ci                        "name": "return",
4091cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with an object:",
4101cb0ef41Sopenharmony_ci                        "options": [
4111cb0ef41Sopenharmony_ci                          {
4121cb0ef41Sopenharmony_ci                            "textRaw": "`value` {ArrayBuffer}",
4131cb0ef41Sopenharmony_ci                            "name": "value",
4141cb0ef41Sopenharmony_ci                            "type": "ArrayBuffer"
4151cb0ef41Sopenharmony_ci                          },
4161cb0ef41Sopenharmony_ci                          {
4171cb0ef41Sopenharmony_ci                            "textRaw": "`done` {boolean}",
4181cb0ef41Sopenharmony_ci                            "name": "done",
4191cb0ef41Sopenharmony_ci                            "type": "boolean"
4201cb0ef41Sopenharmony_ci                          }
4211cb0ef41Sopenharmony_ci                        ]
4221cb0ef41Sopenharmony_ci                      },
4231cb0ef41Sopenharmony_ci                      "params": []
4241cb0ef41Sopenharmony_ci                    }
4251cb0ef41Sopenharmony_ci                  ],
4261cb0ef41Sopenharmony_ci                  "desc": "<p>Requests the next chunk of data from the underlying <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>\nand returns a promise that is fulfilled with the data once it is\navailable.</p>"
4271cb0ef41Sopenharmony_ci                },
4281cb0ef41Sopenharmony_ci                {
4291cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultReader.releaseLock()`",
4301cb0ef41Sopenharmony_ci                  "type": "method",
4311cb0ef41Sopenharmony_ci                  "name": "releaseLock",
4321cb0ef41Sopenharmony_ci                  "meta": {
4331cb0ef41Sopenharmony_ci                    "added": [
4341cb0ef41Sopenharmony_ci                      "v16.5.0"
4351cb0ef41Sopenharmony_ci                    ],
4361cb0ef41Sopenharmony_ci                    "changes": []
4371cb0ef41Sopenharmony_ci                  },
4381cb0ef41Sopenharmony_ci                  "signatures": [
4391cb0ef41Sopenharmony_ci                    {
4401cb0ef41Sopenharmony_ci                      "params": []
4411cb0ef41Sopenharmony_ci                    }
4421cb0ef41Sopenharmony_ci                  ],
4431cb0ef41Sopenharmony_ci                  "desc": "<p>Releases this reader's lock on the underlying <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>.</p>"
4441cb0ef41Sopenharmony_ci                }
4451cb0ef41Sopenharmony_ci              ],
4461cb0ef41Sopenharmony_ci              "properties": [
4471cb0ef41Sopenharmony_ci                {
4481cb0ef41Sopenharmony_ci                  "textRaw": "`closed` Type: {Promise} Fulfilled with `undefined` when the associated {ReadableStream} is closed or rejected if the stream errors or the reader's lock is released before the stream finishes closing.",
4491cb0ef41Sopenharmony_ci                  "type": "Promise",
4501cb0ef41Sopenharmony_ci                  "name": "Type",
4511cb0ef41Sopenharmony_ci                  "meta": {
4521cb0ef41Sopenharmony_ci                    "added": [
4531cb0ef41Sopenharmony_ci                      "v16.5.0"
4541cb0ef41Sopenharmony_ci                    ],
4551cb0ef41Sopenharmony_ci                    "changes": []
4561cb0ef41Sopenharmony_ci                  },
4571cb0ef41Sopenharmony_ci                  "desc": "Fulfilled with `undefined` when the associated {ReadableStream} is closed or rejected if the stream errors or the reader's lock is released before the stream finishes closing."
4581cb0ef41Sopenharmony_ci                }
4591cb0ef41Sopenharmony_ci              ],
4601cb0ef41Sopenharmony_ci              "signatures": [
4611cb0ef41Sopenharmony_ci                {
4621cb0ef41Sopenharmony_ci                  "params": [
4631cb0ef41Sopenharmony_ci                    {
4641cb0ef41Sopenharmony_ci                      "textRaw": "`stream` {ReadableStream}",
4651cb0ef41Sopenharmony_ci                      "name": "stream",
4661cb0ef41Sopenharmony_ci                      "type": "ReadableStream"
4671cb0ef41Sopenharmony_ci                    }
4681cb0ef41Sopenharmony_ci                  ],
4691cb0ef41Sopenharmony_ci                  "desc": "<p>Creates a new <a href=\"webstreams.html#class-readablestreamdefaultreader\" class=\"type\">&lt;ReadableStreamDefaultReader&gt;</a> that is locked to the\ngiven <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>.</p>"
4701cb0ef41Sopenharmony_ci                }
4711cb0ef41Sopenharmony_ci              ]
4721cb0ef41Sopenharmony_ci            },
4731cb0ef41Sopenharmony_ci            {
4741cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableStreamBYOBReader`",
4751cb0ef41Sopenharmony_ci              "type": "class",
4761cb0ef41Sopenharmony_ci              "name": "ReadableStreamBYOBReader",
4771cb0ef41Sopenharmony_ci              "meta": {
4781cb0ef41Sopenharmony_ci                "added": [
4791cb0ef41Sopenharmony_ci                  "v16.5.0"
4801cb0ef41Sopenharmony_ci                ],
4811cb0ef41Sopenharmony_ci                "changes": [
4821cb0ef41Sopenharmony_ci                  {
4831cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
4841cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
4851cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
4861cb0ef41Sopenharmony_ci                  }
4871cb0ef41Sopenharmony_ci                ]
4881cb0ef41Sopenharmony_ci              },
4891cb0ef41Sopenharmony_ci              "desc": "<p>The <code>ReadableStreamBYOBReader</code> is an alternative consumer for\nbyte-oriented <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>s (those that are created with\n<code>underlyingSource.type</code> set equal to <code>'bytes'</code> when the\n<code>ReadableStream</code> was created).</p>\n<p>The <code>BYOB</code> is short for \"bring your own buffer\". This is a\npattern that allows for more efficient reading of byte-oriented\ndata that avoids extraneous copying.</p>\n<pre><code class=\"language-mjs\">import {\n  open,\n} from 'node:fs/promises';\n\nimport {\n  ReadableStream,\n} from 'node:stream/web';\n\nimport { Buffer } from 'node:buffer';\n\nclass Source {\n  type = 'bytes';\n  autoAllocateChunkSize = 1024;\n\n  async start(controller) {\n    this.file = await open(new URL(import.meta.url));\n    this.controller = controller;\n  }\n\n  async pull(controller) {\n    const view = controller.byobRequest?.view;\n    const {\n      bytesRead,\n    } = await this.file.read({\n      buffer: view,\n      offset: view.byteOffset,\n      length: view.byteLength,\n    });\n\n    if (bytesRead === 0) {\n      await this.file.close();\n      this.controller.close();\n    }\n    controller.byobRequest.respond(bytesRead);\n  }\n}\n\nconst stream = new ReadableStream(new Source());\n\nasync function read(stream) {\n  const reader = stream.getReader({ mode: 'byob' });\n\n  const chunks = [];\n  let result;\n  do {\n    result = await reader.read(Buffer.alloc(100));\n    if (result.value !== undefined)\n      chunks.push(Buffer.from(result.value));\n  } while (!result.done);\n\n  return Buffer.concat(chunks);\n}\n\nconst data = await read(stream);\nconsole.log(Buffer.from(data).toString());\n</code></pre>",
4901cb0ef41Sopenharmony_ci              "methods": [
4911cb0ef41Sopenharmony_ci                {
4921cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamBYOBReader.cancel([reason])`",
4931cb0ef41Sopenharmony_ci                  "type": "method",
4941cb0ef41Sopenharmony_ci                  "name": "cancel",
4951cb0ef41Sopenharmony_ci                  "meta": {
4961cb0ef41Sopenharmony_ci                    "added": [
4971cb0ef41Sopenharmony_ci                      "v16.5.0"
4981cb0ef41Sopenharmony_ci                    ],
4991cb0ef41Sopenharmony_ci                    "changes": []
5001cb0ef41Sopenharmony_ci                  },
5011cb0ef41Sopenharmony_ci                  "signatures": [
5021cb0ef41Sopenharmony_ci                    {
5031cb0ef41Sopenharmony_ci                      "return": {
5041cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
5051cb0ef41Sopenharmony_ci                        "name": "return",
5061cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
5071cb0ef41Sopenharmony_ci                      },
5081cb0ef41Sopenharmony_ci                      "params": [
5091cb0ef41Sopenharmony_ci                        {
5101cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
5111cb0ef41Sopenharmony_ci                          "name": "reason",
5121cb0ef41Sopenharmony_ci                          "type": "any"
5131cb0ef41Sopenharmony_ci                        }
5141cb0ef41Sopenharmony_ci                      ]
5151cb0ef41Sopenharmony_ci                    }
5161cb0ef41Sopenharmony_ci                  ],
5171cb0ef41Sopenharmony_ci                  "desc": "<p>Cancels the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> and returns a promise that is fulfilled\nwhen the underlying stream has been canceled.</p>"
5181cb0ef41Sopenharmony_ci                },
5191cb0ef41Sopenharmony_ci                {
5201cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamBYOBReader.read(view)`",
5211cb0ef41Sopenharmony_ci                  "type": "method",
5221cb0ef41Sopenharmony_ci                  "name": "read",
5231cb0ef41Sopenharmony_ci                  "meta": {
5241cb0ef41Sopenharmony_ci                    "added": [
5251cb0ef41Sopenharmony_ci                      "v16.5.0"
5261cb0ef41Sopenharmony_ci                    ],
5271cb0ef41Sopenharmony_ci                    "changes": []
5281cb0ef41Sopenharmony_ci                  },
5291cb0ef41Sopenharmony_ci                  "signatures": [
5301cb0ef41Sopenharmony_ci                    {
5311cb0ef41Sopenharmony_ci                      "return": {
5321cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with an object:",
5331cb0ef41Sopenharmony_ci                        "name": "return",
5341cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with an object:",
5351cb0ef41Sopenharmony_ci                        "options": [
5361cb0ef41Sopenharmony_ci                          {
5371cb0ef41Sopenharmony_ci                            "textRaw": "`value` {ArrayBuffer}",
5381cb0ef41Sopenharmony_ci                            "name": "value",
5391cb0ef41Sopenharmony_ci                            "type": "ArrayBuffer"
5401cb0ef41Sopenharmony_ci                          },
5411cb0ef41Sopenharmony_ci                          {
5421cb0ef41Sopenharmony_ci                            "textRaw": "`done` {boolean}",
5431cb0ef41Sopenharmony_ci                            "name": "done",
5441cb0ef41Sopenharmony_ci                            "type": "boolean"
5451cb0ef41Sopenharmony_ci                          }
5461cb0ef41Sopenharmony_ci                        ]
5471cb0ef41Sopenharmony_ci                      },
5481cb0ef41Sopenharmony_ci                      "params": [
5491cb0ef41Sopenharmony_ci                        {
5501cb0ef41Sopenharmony_ci                          "textRaw": "`view` {Buffer|TypedArray|DataView}",
5511cb0ef41Sopenharmony_ci                          "name": "view",
5521cb0ef41Sopenharmony_ci                          "type": "Buffer|TypedArray|DataView"
5531cb0ef41Sopenharmony_ci                        }
5541cb0ef41Sopenharmony_ci                      ]
5551cb0ef41Sopenharmony_ci                    }
5561cb0ef41Sopenharmony_ci                  ],
5571cb0ef41Sopenharmony_ci                  "desc": "<p>Requests the next chunk of data from the underlying <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>\nand returns a promise that is fulfilled with the data once it is\navailable.</p>\n<p>Do not pass a pooled <a href=\"buffer.html#class-buffer\" class=\"type\">&lt;Buffer&gt;</a> object instance in to this method.\nPooled <code>Buffer</code> objects are created using <code>Buffer.allocUnsafe()</code>,\nor <code>Buffer.from()</code>, or are often returned by various <code>node:fs</code> module\ncallbacks. These types of <code>Buffer</code>s use a shared underlying\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\" class=\"type\">&lt;ArrayBuffer&gt;</a> object that contains all of the data from all of\nthe pooled <code>Buffer</code> instances. When a <code>Buffer</code>, <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\" class=\"type\">&lt;TypedArray&gt;</a>,\nor <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\" class=\"type\">&lt;DataView&gt;</a> is passed in to <code>readableStreamBYOBReader.read()</code>,\nthe view's underlying <code>ArrayBuffer</code> is <em>detached</em>, invalidating\nall existing views that may exist on that <code>ArrayBuffer</code>. This\ncan have disastrous consequences for your application.</p>"
5581cb0ef41Sopenharmony_ci                },
5591cb0ef41Sopenharmony_ci                {
5601cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamBYOBReader.releaseLock()`",
5611cb0ef41Sopenharmony_ci                  "type": "method",
5621cb0ef41Sopenharmony_ci                  "name": "releaseLock",
5631cb0ef41Sopenharmony_ci                  "meta": {
5641cb0ef41Sopenharmony_ci                    "added": [
5651cb0ef41Sopenharmony_ci                      "v16.5.0"
5661cb0ef41Sopenharmony_ci                    ],
5671cb0ef41Sopenharmony_ci                    "changes": []
5681cb0ef41Sopenharmony_ci                  },
5691cb0ef41Sopenharmony_ci                  "signatures": [
5701cb0ef41Sopenharmony_ci                    {
5711cb0ef41Sopenharmony_ci                      "params": []
5721cb0ef41Sopenharmony_ci                    }
5731cb0ef41Sopenharmony_ci                  ],
5741cb0ef41Sopenharmony_ci                  "desc": "<p>Releases this reader's lock on the underlying <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>.</p>"
5751cb0ef41Sopenharmony_ci                }
5761cb0ef41Sopenharmony_ci              ],
5771cb0ef41Sopenharmony_ci              "properties": [
5781cb0ef41Sopenharmony_ci                {
5791cb0ef41Sopenharmony_ci                  "textRaw": "`closed` Type: {Promise} Fulfilled with `undefined` when the associated {ReadableStream} is closed or rejected if the stream errors or the reader's lock is released before the stream finishes closing.",
5801cb0ef41Sopenharmony_ci                  "type": "Promise",
5811cb0ef41Sopenharmony_ci                  "name": "Type",
5821cb0ef41Sopenharmony_ci                  "meta": {
5831cb0ef41Sopenharmony_ci                    "added": [
5841cb0ef41Sopenharmony_ci                      "v16.5.0"
5851cb0ef41Sopenharmony_ci                    ],
5861cb0ef41Sopenharmony_ci                    "changes": []
5871cb0ef41Sopenharmony_ci                  },
5881cb0ef41Sopenharmony_ci                  "desc": "Fulfilled with `undefined` when the associated {ReadableStream} is closed or rejected if the stream errors or the reader's lock is released before the stream finishes closing."
5891cb0ef41Sopenharmony_ci                }
5901cb0ef41Sopenharmony_ci              ],
5911cb0ef41Sopenharmony_ci              "signatures": [
5921cb0ef41Sopenharmony_ci                {
5931cb0ef41Sopenharmony_ci                  "params": [
5941cb0ef41Sopenharmony_ci                    {
5951cb0ef41Sopenharmony_ci                      "textRaw": "`stream` {ReadableStream}",
5961cb0ef41Sopenharmony_ci                      "name": "stream",
5971cb0ef41Sopenharmony_ci                      "type": "ReadableStream"
5981cb0ef41Sopenharmony_ci                    }
5991cb0ef41Sopenharmony_ci                  ],
6001cb0ef41Sopenharmony_ci                  "desc": "<p>Creates a new <code>ReadableStreamBYOBReader</code> that is locked to the\ngiven <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>.</p>"
6011cb0ef41Sopenharmony_ci                }
6021cb0ef41Sopenharmony_ci              ]
6031cb0ef41Sopenharmony_ci            },
6041cb0ef41Sopenharmony_ci            {
6051cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableStreamDefaultController`",
6061cb0ef41Sopenharmony_ci              "type": "class",
6071cb0ef41Sopenharmony_ci              "name": "ReadableStreamDefaultController",
6081cb0ef41Sopenharmony_ci              "meta": {
6091cb0ef41Sopenharmony_ci                "added": [
6101cb0ef41Sopenharmony_ci                  "v16.5.0"
6111cb0ef41Sopenharmony_ci                ],
6121cb0ef41Sopenharmony_ci                "changes": []
6131cb0ef41Sopenharmony_ci              },
6141cb0ef41Sopenharmony_ci              "desc": "<p>Every <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> has a controller that is responsible for\nthe internal state and management of the stream's queue. The\n<code>ReadableStreamDefaultController</code> is the default controller\nimplementation for <code>ReadableStream</code>s that are not byte-oriented.</p>",
6151cb0ef41Sopenharmony_ci              "methods": [
6161cb0ef41Sopenharmony_ci                {
6171cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultController.close()`",
6181cb0ef41Sopenharmony_ci                  "type": "method",
6191cb0ef41Sopenharmony_ci                  "name": "close",
6201cb0ef41Sopenharmony_ci                  "meta": {
6211cb0ef41Sopenharmony_ci                    "added": [
6221cb0ef41Sopenharmony_ci                      "v16.5.0"
6231cb0ef41Sopenharmony_ci                    ],
6241cb0ef41Sopenharmony_ci                    "changes": []
6251cb0ef41Sopenharmony_ci                  },
6261cb0ef41Sopenharmony_ci                  "signatures": [
6271cb0ef41Sopenharmony_ci                    {
6281cb0ef41Sopenharmony_ci                      "params": []
6291cb0ef41Sopenharmony_ci                    }
6301cb0ef41Sopenharmony_ci                  ],
6311cb0ef41Sopenharmony_ci                  "desc": "<p>Closes the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to which this controller is associated.</p>"
6321cb0ef41Sopenharmony_ci                },
6331cb0ef41Sopenharmony_ci                {
6341cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultController.enqueue([chunk])`",
6351cb0ef41Sopenharmony_ci                  "type": "method",
6361cb0ef41Sopenharmony_ci                  "name": "enqueue",
6371cb0ef41Sopenharmony_ci                  "meta": {
6381cb0ef41Sopenharmony_ci                    "added": [
6391cb0ef41Sopenharmony_ci                      "v16.5.0"
6401cb0ef41Sopenharmony_ci                    ],
6411cb0ef41Sopenharmony_ci                    "changes": []
6421cb0ef41Sopenharmony_ci                  },
6431cb0ef41Sopenharmony_ci                  "signatures": [
6441cb0ef41Sopenharmony_ci                    {
6451cb0ef41Sopenharmony_ci                      "params": [
6461cb0ef41Sopenharmony_ci                        {
6471cb0ef41Sopenharmony_ci                          "textRaw": "`chunk` {any}",
6481cb0ef41Sopenharmony_ci                          "name": "chunk",
6491cb0ef41Sopenharmony_ci                          "type": "any"
6501cb0ef41Sopenharmony_ci                        }
6511cb0ef41Sopenharmony_ci                      ]
6521cb0ef41Sopenharmony_ci                    }
6531cb0ef41Sopenharmony_ci                  ],
6541cb0ef41Sopenharmony_ci                  "desc": "<p>Appends a new chunk of data to the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>'s queue.</p>"
6551cb0ef41Sopenharmony_ci                },
6561cb0ef41Sopenharmony_ci                {
6571cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamDefaultController.error([error])`",
6581cb0ef41Sopenharmony_ci                  "type": "method",
6591cb0ef41Sopenharmony_ci                  "name": "error",
6601cb0ef41Sopenharmony_ci                  "meta": {
6611cb0ef41Sopenharmony_ci                    "added": [
6621cb0ef41Sopenharmony_ci                      "v16.5.0"
6631cb0ef41Sopenharmony_ci                    ],
6641cb0ef41Sopenharmony_ci                    "changes": []
6651cb0ef41Sopenharmony_ci                  },
6661cb0ef41Sopenharmony_ci                  "signatures": [
6671cb0ef41Sopenharmony_ci                    {
6681cb0ef41Sopenharmony_ci                      "params": [
6691cb0ef41Sopenharmony_ci                        {
6701cb0ef41Sopenharmony_ci                          "textRaw": "`error` {any}",
6711cb0ef41Sopenharmony_ci                          "name": "error",
6721cb0ef41Sopenharmony_ci                          "type": "any"
6731cb0ef41Sopenharmony_ci                        }
6741cb0ef41Sopenharmony_ci                      ]
6751cb0ef41Sopenharmony_ci                    }
6761cb0ef41Sopenharmony_ci                  ],
6771cb0ef41Sopenharmony_ci                  "desc": "<p>Signals an error that causes the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to error and close.</p>"
6781cb0ef41Sopenharmony_ci                }
6791cb0ef41Sopenharmony_ci              ],
6801cb0ef41Sopenharmony_ci              "properties": [
6811cb0ef41Sopenharmony_ci                {
6821cb0ef41Sopenharmony_ci                  "textRaw": "`desiredSize` Type: {number}",
6831cb0ef41Sopenharmony_ci                  "type": "number",
6841cb0ef41Sopenharmony_ci                  "name": "Type",
6851cb0ef41Sopenharmony_ci                  "meta": {
6861cb0ef41Sopenharmony_ci                    "added": [
6871cb0ef41Sopenharmony_ci                      "v16.5.0"
6881cb0ef41Sopenharmony_ci                    ],
6891cb0ef41Sopenharmony_ci                    "changes": []
6901cb0ef41Sopenharmony_ci                  },
6911cb0ef41Sopenharmony_ci                  "desc": "<p>Returns the amount of data remaining to fill the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>'s\nqueue.</p>"
6921cb0ef41Sopenharmony_ci                }
6931cb0ef41Sopenharmony_ci              ]
6941cb0ef41Sopenharmony_ci            },
6951cb0ef41Sopenharmony_ci            {
6961cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableByteStreamController`",
6971cb0ef41Sopenharmony_ci              "type": "class",
6981cb0ef41Sopenharmony_ci              "name": "ReadableByteStreamController",
6991cb0ef41Sopenharmony_ci              "meta": {
7001cb0ef41Sopenharmony_ci                "added": [
7011cb0ef41Sopenharmony_ci                  "v16.5.0"
7021cb0ef41Sopenharmony_ci                ],
7031cb0ef41Sopenharmony_ci                "changes": [
7041cb0ef41Sopenharmony_ci                  {
7051cb0ef41Sopenharmony_ci                    "version": "v18.10.0",
7061cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/44702",
7071cb0ef41Sopenharmony_ci                    "description": "Support handling a BYOB pull request from a released reader."
7081cb0ef41Sopenharmony_ci                  }
7091cb0ef41Sopenharmony_ci                ]
7101cb0ef41Sopenharmony_ci              },
7111cb0ef41Sopenharmony_ci              "desc": "<p>Every <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> has a controller that is responsible for\nthe internal state and management of the stream's queue. The\n<code>ReadableByteStreamController</code> is for byte-oriented <code>ReadableStream</code>s.</p>",
7121cb0ef41Sopenharmony_ci              "properties": [
7131cb0ef41Sopenharmony_ci                {
7141cb0ef41Sopenharmony_ci                  "textRaw": "`byobRequest` Type: {ReadableStreamBYOBRequest}",
7151cb0ef41Sopenharmony_ci                  "type": "ReadableStreamBYOBRequest",
7161cb0ef41Sopenharmony_ci                  "name": "Type",
7171cb0ef41Sopenharmony_ci                  "meta": {
7181cb0ef41Sopenharmony_ci                    "added": [
7191cb0ef41Sopenharmony_ci                      "v16.5.0"
7201cb0ef41Sopenharmony_ci                    ],
7211cb0ef41Sopenharmony_ci                    "changes": []
7221cb0ef41Sopenharmony_ci                  },
7231cb0ef41Sopenharmony_ci                  "desc": "<p>Returns the amount of data remaining to fill the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>'s\nqueue.</p>"
7241cb0ef41Sopenharmony_ci                },
7251cb0ef41Sopenharmony_ci                {
7261cb0ef41Sopenharmony_ci                  "textRaw": "`desiredSize` Type: {number}",
7271cb0ef41Sopenharmony_ci                  "type": "number",
7281cb0ef41Sopenharmony_ci                  "name": "Type",
7291cb0ef41Sopenharmony_ci                  "meta": {
7301cb0ef41Sopenharmony_ci                    "added": [
7311cb0ef41Sopenharmony_ci                      "v16.5.0"
7321cb0ef41Sopenharmony_ci                    ],
7331cb0ef41Sopenharmony_ci                    "changes": []
7341cb0ef41Sopenharmony_ci                  },
7351cb0ef41Sopenharmony_ci                  "desc": "<p>Returns the amount of data remaining to fill the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>'s\nqueue.</p>"
7361cb0ef41Sopenharmony_ci                }
7371cb0ef41Sopenharmony_ci              ],
7381cb0ef41Sopenharmony_ci              "methods": [
7391cb0ef41Sopenharmony_ci                {
7401cb0ef41Sopenharmony_ci                  "textRaw": "`readableByteStreamController.close()`",
7411cb0ef41Sopenharmony_ci                  "type": "method",
7421cb0ef41Sopenharmony_ci                  "name": "close",
7431cb0ef41Sopenharmony_ci                  "meta": {
7441cb0ef41Sopenharmony_ci                    "added": [
7451cb0ef41Sopenharmony_ci                      "v16.5.0"
7461cb0ef41Sopenharmony_ci                    ],
7471cb0ef41Sopenharmony_ci                    "changes": []
7481cb0ef41Sopenharmony_ci                  },
7491cb0ef41Sopenharmony_ci                  "signatures": [
7501cb0ef41Sopenharmony_ci                    {
7511cb0ef41Sopenharmony_ci                      "params": []
7521cb0ef41Sopenharmony_ci                    }
7531cb0ef41Sopenharmony_ci                  ],
7541cb0ef41Sopenharmony_ci                  "desc": "<p>Closes the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to which this controller is associated.</p>"
7551cb0ef41Sopenharmony_ci                },
7561cb0ef41Sopenharmony_ci                {
7571cb0ef41Sopenharmony_ci                  "textRaw": "`readableByteStreamController.enqueue(chunk)`",
7581cb0ef41Sopenharmony_ci                  "type": "method",
7591cb0ef41Sopenharmony_ci                  "name": "enqueue",
7601cb0ef41Sopenharmony_ci                  "meta": {
7611cb0ef41Sopenharmony_ci                    "added": [
7621cb0ef41Sopenharmony_ci                      "v16.5.0"
7631cb0ef41Sopenharmony_ci                    ],
7641cb0ef41Sopenharmony_ci                    "changes": []
7651cb0ef41Sopenharmony_ci                  },
7661cb0ef41Sopenharmony_ci                  "signatures": [
7671cb0ef41Sopenharmony_ci                    {
7681cb0ef41Sopenharmony_ci                      "params": [
7691cb0ef41Sopenharmony_ci                        {
7701cb0ef41Sopenharmony_ci                          "textRaw": "`chunk`: {Buffer|TypedArray|DataView}",
7711cb0ef41Sopenharmony_ci                          "name": "chunk",
7721cb0ef41Sopenharmony_ci                          "type": "Buffer|TypedArray|DataView"
7731cb0ef41Sopenharmony_ci                        }
7741cb0ef41Sopenharmony_ci                      ]
7751cb0ef41Sopenharmony_ci                    }
7761cb0ef41Sopenharmony_ci                  ],
7771cb0ef41Sopenharmony_ci                  "desc": "<p>Appends a new chunk of data to the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>'s queue.</p>"
7781cb0ef41Sopenharmony_ci                },
7791cb0ef41Sopenharmony_ci                {
7801cb0ef41Sopenharmony_ci                  "textRaw": "`readableByteStreamController.error([error])`",
7811cb0ef41Sopenharmony_ci                  "type": "method",
7821cb0ef41Sopenharmony_ci                  "name": "error",
7831cb0ef41Sopenharmony_ci                  "meta": {
7841cb0ef41Sopenharmony_ci                    "added": [
7851cb0ef41Sopenharmony_ci                      "v16.5.0"
7861cb0ef41Sopenharmony_ci                    ],
7871cb0ef41Sopenharmony_ci                    "changes": []
7881cb0ef41Sopenharmony_ci                  },
7891cb0ef41Sopenharmony_ci                  "signatures": [
7901cb0ef41Sopenharmony_ci                    {
7911cb0ef41Sopenharmony_ci                      "params": [
7921cb0ef41Sopenharmony_ci                        {
7931cb0ef41Sopenharmony_ci                          "textRaw": "`error` {any}",
7941cb0ef41Sopenharmony_ci                          "name": "error",
7951cb0ef41Sopenharmony_ci                          "type": "any"
7961cb0ef41Sopenharmony_ci                        }
7971cb0ef41Sopenharmony_ci                      ]
7981cb0ef41Sopenharmony_ci                    }
7991cb0ef41Sopenharmony_ci                  ],
8001cb0ef41Sopenharmony_ci                  "desc": "<p>Signals an error that causes the <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> to error and close.</p>"
8011cb0ef41Sopenharmony_ci                }
8021cb0ef41Sopenharmony_ci              ]
8031cb0ef41Sopenharmony_ci            },
8041cb0ef41Sopenharmony_ci            {
8051cb0ef41Sopenharmony_ci              "textRaw": "Class: `ReadableStreamBYOBRequest`",
8061cb0ef41Sopenharmony_ci              "type": "class",
8071cb0ef41Sopenharmony_ci              "name": "ReadableStreamBYOBRequest",
8081cb0ef41Sopenharmony_ci              "meta": {
8091cb0ef41Sopenharmony_ci                "added": [
8101cb0ef41Sopenharmony_ci                  "v16.5.0"
8111cb0ef41Sopenharmony_ci                ],
8121cb0ef41Sopenharmony_ci                "changes": [
8131cb0ef41Sopenharmony_ci                  {
8141cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
8151cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
8161cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
8171cb0ef41Sopenharmony_ci                  }
8181cb0ef41Sopenharmony_ci                ]
8191cb0ef41Sopenharmony_ci              },
8201cb0ef41Sopenharmony_ci              "desc": "<p>When using <code>ReadableByteStreamController</code> in byte-oriented\nstreams, and when using the <code>ReadableStreamBYOBReader</code>,\nthe <code>readableByteStreamController.byobRequest</code> property\nprovides access to a <code>ReadableStreamBYOBRequest</code> instance\nthat represents the current read request. The object\nis used to gain access to the <code>ArrayBuffer</code>/<code>TypedArray</code>\nthat has been provided for the read request to fill,\nand provides methods for signaling that the data has\nbeen provided.</p>",
8211cb0ef41Sopenharmony_ci              "methods": [
8221cb0ef41Sopenharmony_ci                {
8231cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamBYOBRequest.respond(bytesWritten)`",
8241cb0ef41Sopenharmony_ci                  "type": "method",
8251cb0ef41Sopenharmony_ci                  "name": "respond",
8261cb0ef41Sopenharmony_ci                  "meta": {
8271cb0ef41Sopenharmony_ci                    "added": [
8281cb0ef41Sopenharmony_ci                      "v16.5.0"
8291cb0ef41Sopenharmony_ci                    ],
8301cb0ef41Sopenharmony_ci                    "changes": []
8311cb0ef41Sopenharmony_ci                  },
8321cb0ef41Sopenharmony_ci                  "signatures": [
8331cb0ef41Sopenharmony_ci                    {
8341cb0ef41Sopenharmony_ci                      "params": [
8351cb0ef41Sopenharmony_ci                        {
8361cb0ef41Sopenharmony_ci                          "textRaw": "`bytesWritten` {number}",
8371cb0ef41Sopenharmony_ci                          "name": "bytesWritten",
8381cb0ef41Sopenharmony_ci                          "type": "number"
8391cb0ef41Sopenharmony_ci                        }
8401cb0ef41Sopenharmony_ci                      ]
8411cb0ef41Sopenharmony_ci                    }
8421cb0ef41Sopenharmony_ci                  ],
8431cb0ef41Sopenharmony_ci                  "desc": "<p>Signals that a <code>bytesWritten</code> number of bytes have been written\nto <code>readableStreamBYOBRequest.view</code>.</p>"
8441cb0ef41Sopenharmony_ci                },
8451cb0ef41Sopenharmony_ci                {
8461cb0ef41Sopenharmony_ci                  "textRaw": "`readableStreamBYOBRequest.respondWithNewView(view)`",
8471cb0ef41Sopenharmony_ci                  "type": "method",
8481cb0ef41Sopenharmony_ci                  "name": "respondWithNewView",
8491cb0ef41Sopenharmony_ci                  "meta": {
8501cb0ef41Sopenharmony_ci                    "added": [
8511cb0ef41Sopenharmony_ci                      "v16.5.0"
8521cb0ef41Sopenharmony_ci                    ],
8531cb0ef41Sopenharmony_ci                    "changes": []
8541cb0ef41Sopenharmony_ci                  },
8551cb0ef41Sopenharmony_ci                  "signatures": [
8561cb0ef41Sopenharmony_ci                    {
8571cb0ef41Sopenharmony_ci                      "params": [
8581cb0ef41Sopenharmony_ci                        {
8591cb0ef41Sopenharmony_ci                          "textRaw": "`view` {Buffer|TypedArray|DataView}",
8601cb0ef41Sopenharmony_ci                          "name": "view",
8611cb0ef41Sopenharmony_ci                          "type": "Buffer|TypedArray|DataView"
8621cb0ef41Sopenharmony_ci                        }
8631cb0ef41Sopenharmony_ci                      ]
8641cb0ef41Sopenharmony_ci                    }
8651cb0ef41Sopenharmony_ci                  ],
8661cb0ef41Sopenharmony_ci                  "desc": "<p>Signals that the request has been fulfilled with bytes written\nto a new <code>Buffer</code>, <code>TypedArray</code>, or <code>DataView</code>.</p>"
8671cb0ef41Sopenharmony_ci                }
8681cb0ef41Sopenharmony_ci              ],
8691cb0ef41Sopenharmony_ci              "properties": [
8701cb0ef41Sopenharmony_ci                {
8711cb0ef41Sopenharmony_ci                  "textRaw": "`view` Type: {Buffer|TypedArray|DataView}",
8721cb0ef41Sopenharmony_ci                  "type": "Buffer|TypedArray|DataView",
8731cb0ef41Sopenharmony_ci                  "name": "Type",
8741cb0ef41Sopenharmony_ci                  "meta": {
8751cb0ef41Sopenharmony_ci                    "added": [
8761cb0ef41Sopenharmony_ci                      "v16.5.0"
8771cb0ef41Sopenharmony_ci                    ],
8781cb0ef41Sopenharmony_ci                    "changes": []
8791cb0ef41Sopenharmony_ci                  }
8801cb0ef41Sopenharmony_ci                }
8811cb0ef41Sopenharmony_ci              ]
8821cb0ef41Sopenharmony_ci            },
8831cb0ef41Sopenharmony_ci            {
8841cb0ef41Sopenharmony_ci              "textRaw": "Class: `WritableStream`",
8851cb0ef41Sopenharmony_ci              "type": "class",
8861cb0ef41Sopenharmony_ci              "name": "WritableStream",
8871cb0ef41Sopenharmony_ci              "meta": {
8881cb0ef41Sopenharmony_ci                "added": [
8891cb0ef41Sopenharmony_ci                  "v16.5.0"
8901cb0ef41Sopenharmony_ci                ],
8911cb0ef41Sopenharmony_ci                "changes": [
8921cb0ef41Sopenharmony_ci                  {
8931cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
8941cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
8951cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
8961cb0ef41Sopenharmony_ci                  }
8971cb0ef41Sopenharmony_ci                ]
8981cb0ef41Sopenharmony_ci              },
8991cb0ef41Sopenharmony_ci              "desc": "<p>The <code>WritableStream</code> is a destination to which stream data is sent.</p>\n<pre><code class=\"language-mjs\">import {\n  WritableStream,\n} from 'node:stream/web';\n\nconst stream = new WritableStream({\n  write(chunk) {\n    console.log(chunk);\n  },\n});\n\nawait stream.getWriter().write('Hello World');\n</code></pre>",
9001cb0ef41Sopenharmony_ci              "methods": [
9011cb0ef41Sopenharmony_ci                {
9021cb0ef41Sopenharmony_ci                  "textRaw": "`writableStream.abort([reason])`",
9031cb0ef41Sopenharmony_ci                  "type": "method",
9041cb0ef41Sopenharmony_ci                  "name": "abort",
9051cb0ef41Sopenharmony_ci                  "meta": {
9061cb0ef41Sopenharmony_ci                    "added": [
9071cb0ef41Sopenharmony_ci                      "v16.5.0"
9081cb0ef41Sopenharmony_ci                    ],
9091cb0ef41Sopenharmony_ci                    "changes": []
9101cb0ef41Sopenharmony_ci                  },
9111cb0ef41Sopenharmony_ci                  "signatures": [
9121cb0ef41Sopenharmony_ci                    {
9131cb0ef41Sopenharmony_ci                      "return": {
9141cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
9151cb0ef41Sopenharmony_ci                        "name": "return",
9161cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
9171cb0ef41Sopenharmony_ci                      },
9181cb0ef41Sopenharmony_ci                      "params": [
9191cb0ef41Sopenharmony_ci                        {
9201cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
9211cb0ef41Sopenharmony_ci                          "name": "reason",
9221cb0ef41Sopenharmony_ci                          "type": "any"
9231cb0ef41Sopenharmony_ci                        }
9241cb0ef41Sopenharmony_ci                      ]
9251cb0ef41Sopenharmony_ci                    }
9261cb0ef41Sopenharmony_ci                  ],
9271cb0ef41Sopenharmony_ci                  "desc": "<p>Abruptly terminates the <code>WritableStream</code>. All queued writes will be\ncanceled with their associated promises rejected.</p>"
9281cb0ef41Sopenharmony_ci                },
9291cb0ef41Sopenharmony_ci                {
9301cb0ef41Sopenharmony_ci                  "textRaw": "`writableStream.close()`",
9311cb0ef41Sopenharmony_ci                  "type": "method",
9321cb0ef41Sopenharmony_ci                  "name": "close",
9331cb0ef41Sopenharmony_ci                  "meta": {
9341cb0ef41Sopenharmony_ci                    "added": [
9351cb0ef41Sopenharmony_ci                      "v16.5.0"
9361cb0ef41Sopenharmony_ci                    ],
9371cb0ef41Sopenharmony_ci                    "changes": []
9381cb0ef41Sopenharmony_ci                  },
9391cb0ef41Sopenharmony_ci                  "signatures": [
9401cb0ef41Sopenharmony_ci                    {
9411cb0ef41Sopenharmony_ci                      "return": {
9421cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
9431cb0ef41Sopenharmony_ci                        "name": "return",
9441cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
9451cb0ef41Sopenharmony_ci                      },
9461cb0ef41Sopenharmony_ci                      "params": []
9471cb0ef41Sopenharmony_ci                    }
9481cb0ef41Sopenharmony_ci                  ],
9491cb0ef41Sopenharmony_ci                  "desc": "<p>Closes the <code>WritableStream</code> when no additional writes are expected.</p>"
9501cb0ef41Sopenharmony_ci                },
9511cb0ef41Sopenharmony_ci                {
9521cb0ef41Sopenharmony_ci                  "textRaw": "`writableStream.getWriter()`",
9531cb0ef41Sopenharmony_ci                  "type": "method",
9541cb0ef41Sopenharmony_ci                  "name": "getWriter",
9551cb0ef41Sopenharmony_ci                  "meta": {
9561cb0ef41Sopenharmony_ci                    "added": [
9571cb0ef41Sopenharmony_ci                      "v16.5.0"
9581cb0ef41Sopenharmony_ci                    ],
9591cb0ef41Sopenharmony_ci                    "changes": []
9601cb0ef41Sopenharmony_ci                  },
9611cb0ef41Sopenharmony_ci                  "signatures": [
9621cb0ef41Sopenharmony_ci                    {
9631cb0ef41Sopenharmony_ci                      "return": {
9641cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {WritableStreamDefaultWriter}",
9651cb0ef41Sopenharmony_ci                        "name": "return",
9661cb0ef41Sopenharmony_ci                        "type": "WritableStreamDefaultWriter"
9671cb0ef41Sopenharmony_ci                      },
9681cb0ef41Sopenharmony_ci                      "params": []
9691cb0ef41Sopenharmony_ci                    }
9701cb0ef41Sopenharmony_ci                  ],
9711cb0ef41Sopenharmony_ci                  "desc": "<p>Creates and returns a new writer instance that can be used to write\ndata into the <code>WritableStream</code>.</p>"
9721cb0ef41Sopenharmony_ci                }
9731cb0ef41Sopenharmony_ci              ],
9741cb0ef41Sopenharmony_ci              "properties": [
9751cb0ef41Sopenharmony_ci                {
9761cb0ef41Sopenharmony_ci                  "textRaw": "`locked` Type: {boolean}",
9771cb0ef41Sopenharmony_ci                  "type": "boolean",
9781cb0ef41Sopenharmony_ci                  "name": "Type",
9791cb0ef41Sopenharmony_ci                  "meta": {
9801cb0ef41Sopenharmony_ci                    "added": [
9811cb0ef41Sopenharmony_ci                      "v16.5.0"
9821cb0ef41Sopenharmony_ci                    ],
9831cb0ef41Sopenharmony_ci                    "changes": []
9841cb0ef41Sopenharmony_ci                  },
9851cb0ef41Sopenharmony_ci                  "desc": "<p>The <code>writableStream.locked</code> property is <code>false</code> by default, and is\nswitched to <code>true</code> while there is an active writer attached to this\n<code>WritableStream</code>.</p>"
9861cb0ef41Sopenharmony_ci                }
9871cb0ef41Sopenharmony_ci              ],
9881cb0ef41Sopenharmony_ci              "modules": [
9891cb0ef41Sopenharmony_ci                {
9901cb0ef41Sopenharmony_ci                  "textRaw": "Transferring with postMessage()",
9911cb0ef41Sopenharmony_ci                  "name": "transferring_with_postmessage()",
9921cb0ef41Sopenharmony_ci                  "desc": "<p>A <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a> instance can be transferred using a <a href=\"worker_threads.html#class-messageport\" class=\"type\">&lt;MessagePort&gt;</a>.</p>\n<pre><code class=\"language-js\">const stream = new WritableStream(getWritableSinkSomehow());\n\nconst { port1, port2 } = new MessageChannel();\n\nport1.onmessage = ({ data }) => {\n  data.getWriter().write('hello');\n};\n\nport2.postMessage(stream, [stream]);\n</code></pre>",
9931cb0ef41Sopenharmony_ci                  "type": "module",
9941cb0ef41Sopenharmony_ci                  "displayName": "Transferring with postMessage()"
9951cb0ef41Sopenharmony_ci                }
9961cb0ef41Sopenharmony_ci              ],
9971cb0ef41Sopenharmony_ci              "signatures": [
9981cb0ef41Sopenharmony_ci                {
9991cb0ef41Sopenharmony_ci                  "params": [
10001cb0ef41Sopenharmony_ci                    {
10011cb0ef41Sopenharmony_ci                      "textRaw": "`underlyingSink` {Object}",
10021cb0ef41Sopenharmony_ci                      "name": "underlyingSink",
10031cb0ef41Sopenharmony_ci                      "type": "Object",
10041cb0ef41Sopenharmony_ci                      "options": [
10051cb0ef41Sopenharmony_ci                        {
10061cb0ef41Sopenharmony_ci                          "textRaw": "`start` {Function} A user-defined function that is invoked immediately when the `WritableStream` is created.",
10071cb0ef41Sopenharmony_ci                          "name": "start",
10081cb0ef41Sopenharmony_ci                          "type": "Function",
10091cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is invoked immediately when the `WritableStream` is created.",
10101cb0ef41Sopenharmony_ci                          "options": [
10111cb0ef41Sopenharmony_ci                            {
10121cb0ef41Sopenharmony_ci                              "textRaw": "`controller` {WritableStreamDefaultController}",
10131cb0ef41Sopenharmony_ci                              "name": "controller",
10141cb0ef41Sopenharmony_ci                              "type": "WritableStreamDefaultController"
10151cb0ef41Sopenharmony_ci                            },
10161cb0ef41Sopenharmony_ci                            {
10171cb0ef41Sopenharmony_ci                              "textRaw": "Returns: `undefined` or a promise fulfilled with `undefined`.",
10181cb0ef41Sopenharmony_ci                              "name": "return",
10191cb0ef41Sopenharmony_ci                              "desc": "`undefined` or a promise fulfilled with `undefined`."
10201cb0ef41Sopenharmony_ci                            }
10211cb0ef41Sopenharmony_ci                          ]
10221cb0ef41Sopenharmony_ci                        },
10231cb0ef41Sopenharmony_ci                        {
10241cb0ef41Sopenharmony_ci                          "textRaw": "`write` {Function} A user-defined function that is invoked when a chunk of data has been written to the `WritableStream`.",
10251cb0ef41Sopenharmony_ci                          "name": "write",
10261cb0ef41Sopenharmony_ci                          "type": "Function",
10271cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is invoked when a chunk of data has been written to the `WritableStream`.",
10281cb0ef41Sopenharmony_ci                          "options": [
10291cb0ef41Sopenharmony_ci                            {
10301cb0ef41Sopenharmony_ci                              "textRaw": "`chunk` {any}",
10311cb0ef41Sopenharmony_ci                              "name": "chunk",
10321cb0ef41Sopenharmony_ci                              "type": "any"
10331cb0ef41Sopenharmony_ci                            },
10341cb0ef41Sopenharmony_ci                            {
10351cb0ef41Sopenharmony_ci                              "textRaw": "`controller` {WritableStreamDefaultController}",
10361cb0ef41Sopenharmony_ci                              "name": "controller",
10371cb0ef41Sopenharmony_ci                              "type": "WritableStreamDefaultController"
10381cb0ef41Sopenharmony_ci                            },
10391cb0ef41Sopenharmony_ci                            {
10401cb0ef41Sopenharmony_ci                              "textRaw": "Returns: A promise fulfilled with `undefined`.",
10411cb0ef41Sopenharmony_ci                              "name": "return",
10421cb0ef41Sopenharmony_ci                              "desc": "A promise fulfilled with `undefined`."
10431cb0ef41Sopenharmony_ci                            }
10441cb0ef41Sopenharmony_ci                          ]
10451cb0ef41Sopenharmony_ci                        },
10461cb0ef41Sopenharmony_ci                        {
10471cb0ef41Sopenharmony_ci                          "textRaw": "`close` {Function} A user-defined function that is called when the `WritableStream` is closed.",
10481cb0ef41Sopenharmony_ci                          "name": "close",
10491cb0ef41Sopenharmony_ci                          "type": "Function",
10501cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is called when the `WritableStream` is closed.",
10511cb0ef41Sopenharmony_ci                          "options": [
10521cb0ef41Sopenharmony_ci                            {
10531cb0ef41Sopenharmony_ci                              "textRaw": "Returns: A promise fulfilled with `undefined`.",
10541cb0ef41Sopenharmony_ci                              "name": "return",
10551cb0ef41Sopenharmony_ci                              "desc": "A promise fulfilled with `undefined`."
10561cb0ef41Sopenharmony_ci                            }
10571cb0ef41Sopenharmony_ci                          ]
10581cb0ef41Sopenharmony_ci                        },
10591cb0ef41Sopenharmony_ci                        {
10601cb0ef41Sopenharmony_ci                          "textRaw": "`abort` {Function} A user-defined function that is called to abruptly close the `WritableStream`.",
10611cb0ef41Sopenharmony_ci                          "name": "abort",
10621cb0ef41Sopenharmony_ci                          "type": "Function",
10631cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is called to abruptly close the `WritableStream`.",
10641cb0ef41Sopenharmony_ci                          "options": [
10651cb0ef41Sopenharmony_ci                            {
10661cb0ef41Sopenharmony_ci                              "textRaw": "`reason` {any}",
10671cb0ef41Sopenharmony_ci                              "name": "reason",
10681cb0ef41Sopenharmony_ci                              "type": "any"
10691cb0ef41Sopenharmony_ci                            },
10701cb0ef41Sopenharmony_ci                            {
10711cb0ef41Sopenharmony_ci                              "textRaw": "Returns: A promise fulfilled with `undefined`.",
10721cb0ef41Sopenharmony_ci                              "name": "return",
10731cb0ef41Sopenharmony_ci                              "desc": "A promise fulfilled with `undefined`."
10741cb0ef41Sopenharmony_ci                            }
10751cb0ef41Sopenharmony_ci                          ]
10761cb0ef41Sopenharmony_ci                        },
10771cb0ef41Sopenharmony_ci                        {
10781cb0ef41Sopenharmony_ci                          "textRaw": "`type` {any} The `type` option is reserved for future use and _must_ be undefined.",
10791cb0ef41Sopenharmony_ci                          "name": "type",
10801cb0ef41Sopenharmony_ci                          "type": "any",
10811cb0ef41Sopenharmony_ci                          "desc": "The `type` option is reserved for future use and _must_ be undefined."
10821cb0ef41Sopenharmony_ci                        }
10831cb0ef41Sopenharmony_ci                      ]
10841cb0ef41Sopenharmony_ci                    },
10851cb0ef41Sopenharmony_ci                    {
10861cb0ef41Sopenharmony_ci                      "textRaw": "`strategy` {Object}",
10871cb0ef41Sopenharmony_ci                      "name": "strategy",
10881cb0ef41Sopenharmony_ci                      "type": "Object",
10891cb0ef41Sopenharmony_ci                      "options": [
10901cb0ef41Sopenharmony_ci                        {
10911cb0ef41Sopenharmony_ci                          "textRaw": "`highWaterMark` {number} The maximum internal queue size before backpressure is applied.",
10921cb0ef41Sopenharmony_ci                          "name": "highWaterMark",
10931cb0ef41Sopenharmony_ci                          "type": "number",
10941cb0ef41Sopenharmony_ci                          "desc": "The maximum internal queue size before backpressure is applied."
10951cb0ef41Sopenharmony_ci                        },
10961cb0ef41Sopenharmony_ci                        {
10971cb0ef41Sopenharmony_ci                          "textRaw": "`size` {Function} A user-defined function used to identify the size of each chunk of data.",
10981cb0ef41Sopenharmony_ci                          "name": "size",
10991cb0ef41Sopenharmony_ci                          "type": "Function",
11001cb0ef41Sopenharmony_ci                          "desc": "A user-defined function used to identify the size of each chunk of data.",
11011cb0ef41Sopenharmony_ci                          "options": [
11021cb0ef41Sopenharmony_ci                            {
11031cb0ef41Sopenharmony_ci                              "textRaw": "`chunk` {any}",
11041cb0ef41Sopenharmony_ci                              "name": "chunk",
11051cb0ef41Sopenharmony_ci                              "type": "any"
11061cb0ef41Sopenharmony_ci                            },
11071cb0ef41Sopenharmony_ci                            {
11081cb0ef41Sopenharmony_ci                              "textRaw": "Returns: {number}",
11091cb0ef41Sopenharmony_ci                              "name": "return",
11101cb0ef41Sopenharmony_ci                              "type": "number"
11111cb0ef41Sopenharmony_ci                            }
11121cb0ef41Sopenharmony_ci                          ]
11131cb0ef41Sopenharmony_ci                        }
11141cb0ef41Sopenharmony_ci                      ]
11151cb0ef41Sopenharmony_ci                    }
11161cb0ef41Sopenharmony_ci                  ]
11171cb0ef41Sopenharmony_ci                }
11181cb0ef41Sopenharmony_ci              ]
11191cb0ef41Sopenharmony_ci            },
11201cb0ef41Sopenharmony_ci            {
11211cb0ef41Sopenharmony_ci              "textRaw": "Class: `WritableStreamDefaultWriter`",
11221cb0ef41Sopenharmony_ci              "type": "class",
11231cb0ef41Sopenharmony_ci              "name": "WritableStreamDefaultWriter",
11241cb0ef41Sopenharmony_ci              "meta": {
11251cb0ef41Sopenharmony_ci                "added": [
11261cb0ef41Sopenharmony_ci                  "v16.5.0"
11271cb0ef41Sopenharmony_ci                ],
11281cb0ef41Sopenharmony_ci                "changes": [
11291cb0ef41Sopenharmony_ci                  {
11301cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
11311cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
11321cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
11331cb0ef41Sopenharmony_ci                  }
11341cb0ef41Sopenharmony_ci                ]
11351cb0ef41Sopenharmony_ci              },
11361cb0ef41Sopenharmony_ci              "methods": [
11371cb0ef41Sopenharmony_ci                {
11381cb0ef41Sopenharmony_ci                  "textRaw": "`writableStreamDefaultWriter.abort([reason])`",
11391cb0ef41Sopenharmony_ci                  "type": "method",
11401cb0ef41Sopenharmony_ci                  "name": "abort",
11411cb0ef41Sopenharmony_ci                  "meta": {
11421cb0ef41Sopenharmony_ci                    "added": [
11431cb0ef41Sopenharmony_ci                      "v16.5.0"
11441cb0ef41Sopenharmony_ci                    ],
11451cb0ef41Sopenharmony_ci                    "changes": []
11461cb0ef41Sopenharmony_ci                  },
11471cb0ef41Sopenharmony_ci                  "signatures": [
11481cb0ef41Sopenharmony_ci                    {
11491cb0ef41Sopenharmony_ci                      "return": {
11501cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
11511cb0ef41Sopenharmony_ci                        "name": "return",
11521cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
11531cb0ef41Sopenharmony_ci                      },
11541cb0ef41Sopenharmony_ci                      "params": [
11551cb0ef41Sopenharmony_ci                        {
11561cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
11571cb0ef41Sopenharmony_ci                          "name": "reason",
11581cb0ef41Sopenharmony_ci                          "type": "any"
11591cb0ef41Sopenharmony_ci                        }
11601cb0ef41Sopenharmony_ci                      ]
11611cb0ef41Sopenharmony_ci                    }
11621cb0ef41Sopenharmony_ci                  ],
11631cb0ef41Sopenharmony_ci                  "desc": "<p>Abruptly terminates the <code>WritableStream</code>. All queued writes will be\ncanceled with their associated promises rejected.</p>"
11641cb0ef41Sopenharmony_ci                },
11651cb0ef41Sopenharmony_ci                {
11661cb0ef41Sopenharmony_ci                  "textRaw": "`writableStreamDefaultWriter.close()`",
11671cb0ef41Sopenharmony_ci                  "type": "method",
11681cb0ef41Sopenharmony_ci                  "name": "close",
11691cb0ef41Sopenharmony_ci                  "meta": {
11701cb0ef41Sopenharmony_ci                    "added": [
11711cb0ef41Sopenharmony_ci                      "v16.5.0"
11721cb0ef41Sopenharmony_ci                    ],
11731cb0ef41Sopenharmony_ci                    "changes": []
11741cb0ef41Sopenharmony_ci                  },
11751cb0ef41Sopenharmony_ci                  "signatures": [
11761cb0ef41Sopenharmony_ci                    {
11771cb0ef41Sopenharmony_ci                      "return": {
11781cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
11791cb0ef41Sopenharmony_ci                        "name": "return",
11801cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
11811cb0ef41Sopenharmony_ci                      },
11821cb0ef41Sopenharmony_ci                      "params": []
11831cb0ef41Sopenharmony_ci                    }
11841cb0ef41Sopenharmony_ci                  ],
11851cb0ef41Sopenharmony_ci                  "desc": "<p>Closes the <code>WritableStream</code> when no additional writes are expected.</p>"
11861cb0ef41Sopenharmony_ci                },
11871cb0ef41Sopenharmony_ci                {
11881cb0ef41Sopenharmony_ci                  "textRaw": "`writableStreamDefaultWriter.releaseLock()`",
11891cb0ef41Sopenharmony_ci                  "type": "method",
11901cb0ef41Sopenharmony_ci                  "name": "releaseLock",
11911cb0ef41Sopenharmony_ci                  "meta": {
11921cb0ef41Sopenharmony_ci                    "added": [
11931cb0ef41Sopenharmony_ci                      "v16.5.0"
11941cb0ef41Sopenharmony_ci                    ],
11951cb0ef41Sopenharmony_ci                    "changes": []
11961cb0ef41Sopenharmony_ci                  },
11971cb0ef41Sopenharmony_ci                  "signatures": [
11981cb0ef41Sopenharmony_ci                    {
11991cb0ef41Sopenharmony_ci                      "params": []
12001cb0ef41Sopenharmony_ci                    }
12011cb0ef41Sopenharmony_ci                  ],
12021cb0ef41Sopenharmony_ci                  "desc": "<p>Releases this writer's lock on the underlying <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a>.</p>"
12031cb0ef41Sopenharmony_ci                },
12041cb0ef41Sopenharmony_ci                {
12051cb0ef41Sopenharmony_ci                  "textRaw": "`writableStreamDefaultWriter.write([chunk])`",
12061cb0ef41Sopenharmony_ci                  "type": "method",
12071cb0ef41Sopenharmony_ci                  "name": "write",
12081cb0ef41Sopenharmony_ci                  "meta": {
12091cb0ef41Sopenharmony_ci                    "added": [
12101cb0ef41Sopenharmony_ci                      "v16.5.0"
12111cb0ef41Sopenharmony_ci                    ],
12121cb0ef41Sopenharmony_ci                    "changes": []
12131cb0ef41Sopenharmony_ci                  },
12141cb0ef41Sopenharmony_ci                  "signatures": [
12151cb0ef41Sopenharmony_ci                    {
12161cb0ef41Sopenharmony_ci                      "return": {
12171cb0ef41Sopenharmony_ci                        "textRaw": "Returns: A promise fulfilled with `undefined`.",
12181cb0ef41Sopenharmony_ci                        "name": "return",
12191cb0ef41Sopenharmony_ci                        "desc": "A promise fulfilled with `undefined`."
12201cb0ef41Sopenharmony_ci                      },
12211cb0ef41Sopenharmony_ci                      "params": [
12221cb0ef41Sopenharmony_ci                        {
12231cb0ef41Sopenharmony_ci                          "textRaw": "`chunk`: {any}",
12241cb0ef41Sopenharmony_ci                          "name": "chunk",
12251cb0ef41Sopenharmony_ci                          "type": "any"
12261cb0ef41Sopenharmony_ci                        }
12271cb0ef41Sopenharmony_ci                      ]
12281cb0ef41Sopenharmony_ci                    }
12291cb0ef41Sopenharmony_ci                  ],
12301cb0ef41Sopenharmony_ci                  "desc": "<p>Appends a new chunk of data to the <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a>'s queue.</p>"
12311cb0ef41Sopenharmony_ci                }
12321cb0ef41Sopenharmony_ci              ],
12331cb0ef41Sopenharmony_ci              "properties": [
12341cb0ef41Sopenharmony_ci                {
12351cb0ef41Sopenharmony_ci                  "textRaw": "`closed` Type: {Promise} Fulfilled with `undefined` when the associated {WritableStream} is closed or rejected if the stream errors or the writer's lock is released before the stream finishes closing.",
12361cb0ef41Sopenharmony_ci                  "type": "Promise",
12371cb0ef41Sopenharmony_ci                  "name": "Type",
12381cb0ef41Sopenharmony_ci                  "meta": {
12391cb0ef41Sopenharmony_ci                    "added": [
12401cb0ef41Sopenharmony_ci                      "v16.5.0"
12411cb0ef41Sopenharmony_ci                    ],
12421cb0ef41Sopenharmony_ci                    "changes": []
12431cb0ef41Sopenharmony_ci                  },
12441cb0ef41Sopenharmony_ci                  "desc": "Fulfilled with `undefined` when the associated {WritableStream} is closed or rejected if the stream errors or the writer's lock is released before the stream finishes closing."
12451cb0ef41Sopenharmony_ci                },
12461cb0ef41Sopenharmony_ci                {
12471cb0ef41Sopenharmony_ci                  "textRaw": "`desiredSize` Type: {number}",
12481cb0ef41Sopenharmony_ci                  "type": "number",
12491cb0ef41Sopenharmony_ci                  "name": "Type",
12501cb0ef41Sopenharmony_ci                  "meta": {
12511cb0ef41Sopenharmony_ci                    "added": [
12521cb0ef41Sopenharmony_ci                      "v16.5.0"
12531cb0ef41Sopenharmony_ci                    ],
12541cb0ef41Sopenharmony_ci                    "changes": []
12551cb0ef41Sopenharmony_ci                  },
12561cb0ef41Sopenharmony_ci                  "desc": "<p>The amount of data required to fill the <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a>'s queue.</p>"
12571cb0ef41Sopenharmony_ci                },
12581cb0ef41Sopenharmony_ci                {
12591cb0ef41Sopenharmony_ci                  "textRaw": "`ready` Type: {Promise} Fulfilled with `undefined` when the writer is ready to be used.",
12601cb0ef41Sopenharmony_ci                  "type": "Promise",
12611cb0ef41Sopenharmony_ci                  "name": "Type",
12621cb0ef41Sopenharmony_ci                  "meta": {
12631cb0ef41Sopenharmony_ci                    "added": [
12641cb0ef41Sopenharmony_ci                      "v16.5.0"
12651cb0ef41Sopenharmony_ci                    ],
12661cb0ef41Sopenharmony_ci                    "changes": []
12671cb0ef41Sopenharmony_ci                  },
12681cb0ef41Sopenharmony_ci                  "desc": "Fulfilled with `undefined` when the writer is ready to be used."
12691cb0ef41Sopenharmony_ci                }
12701cb0ef41Sopenharmony_ci              ],
12711cb0ef41Sopenharmony_ci              "signatures": [
12721cb0ef41Sopenharmony_ci                {
12731cb0ef41Sopenharmony_ci                  "params": [
12741cb0ef41Sopenharmony_ci                    {
12751cb0ef41Sopenharmony_ci                      "textRaw": "`stream` {WritableStream}",
12761cb0ef41Sopenharmony_ci                      "name": "stream",
12771cb0ef41Sopenharmony_ci                      "type": "WritableStream"
12781cb0ef41Sopenharmony_ci                    }
12791cb0ef41Sopenharmony_ci                  ],
12801cb0ef41Sopenharmony_ci                  "desc": "<p>Creates a new <code>WritableStreamDefaultWriter</code> that is locked to the given\n<code>WritableStream</code>.</p>"
12811cb0ef41Sopenharmony_ci                }
12821cb0ef41Sopenharmony_ci              ]
12831cb0ef41Sopenharmony_ci            },
12841cb0ef41Sopenharmony_ci            {
12851cb0ef41Sopenharmony_ci              "textRaw": "Class: `WritableStreamDefaultController`",
12861cb0ef41Sopenharmony_ci              "type": "class",
12871cb0ef41Sopenharmony_ci              "name": "WritableStreamDefaultController",
12881cb0ef41Sopenharmony_ci              "meta": {
12891cb0ef41Sopenharmony_ci                "added": [
12901cb0ef41Sopenharmony_ci                  "v16.5.0"
12911cb0ef41Sopenharmony_ci                ],
12921cb0ef41Sopenharmony_ci                "changes": [
12931cb0ef41Sopenharmony_ci                  {
12941cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
12951cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
12961cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
12971cb0ef41Sopenharmony_ci                  }
12981cb0ef41Sopenharmony_ci                ]
12991cb0ef41Sopenharmony_ci              },
13001cb0ef41Sopenharmony_ci              "desc": "<p>The <code>WritableStreamDefaultController</code> manage's the <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a>'s\ninternal state.</p>",
13011cb0ef41Sopenharmony_ci              "methods": [
13021cb0ef41Sopenharmony_ci                {
13031cb0ef41Sopenharmony_ci                  "textRaw": "`writableStreamDefaultController.error([error])`",
13041cb0ef41Sopenharmony_ci                  "type": "method",
13051cb0ef41Sopenharmony_ci                  "name": "error",
13061cb0ef41Sopenharmony_ci                  "meta": {
13071cb0ef41Sopenharmony_ci                    "added": [
13081cb0ef41Sopenharmony_ci                      "v16.5.0"
13091cb0ef41Sopenharmony_ci                    ],
13101cb0ef41Sopenharmony_ci                    "changes": []
13111cb0ef41Sopenharmony_ci                  },
13121cb0ef41Sopenharmony_ci                  "signatures": [
13131cb0ef41Sopenharmony_ci                    {
13141cb0ef41Sopenharmony_ci                      "params": [
13151cb0ef41Sopenharmony_ci                        {
13161cb0ef41Sopenharmony_ci                          "textRaw": "`error` {any}",
13171cb0ef41Sopenharmony_ci                          "name": "error",
13181cb0ef41Sopenharmony_ci                          "type": "any"
13191cb0ef41Sopenharmony_ci                        }
13201cb0ef41Sopenharmony_ci                      ]
13211cb0ef41Sopenharmony_ci                    }
13221cb0ef41Sopenharmony_ci                  ],
13231cb0ef41Sopenharmony_ci                  "desc": "<p>Called by user-code to signal that an error has occurred while processing\nthe <code>WritableStream</code> data. When called, the <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a> will be aborted,\nwith currently pending writes canceled.</p>"
13241cb0ef41Sopenharmony_ci                }
13251cb0ef41Sopenharmony_ci              ],
13261cb0ef41Sopenharmony_ci              "properties": [
13271cb0ef41Sopenharmony_ci                {
13281cb0ef41Sopenharmony_ci                  "textRaw": "`signal` Type: {AbortSignal} An `AbortSignal` that can be used to cancel pending write or close operations when a {WritableStream} is aborted.",
13291cb0ef41Sopenharmony_ci                  "type": "AbortSignal",
13301cb0ef41Sopenharmony_ci                  "name": "Type",
13311cb0ef41Sopenharmony_ci                  "desc": "An `AbortSignal` that can be used to cancel pending write or close operations when a {WritableStream} is aborted."
13321cb0ef41Sopenharmony_ci                }
13331cb0ef41Sopenharmony_ci              ]
13341cb0ef41Sopenharmony_ci            },
13351cb0ef41Sopenharmony_ci            {
13361cb0ef41Sopenharmony_ci              "textRaw": "Class: `TransformStream`",
13371cb0ef41Sopenharmony_ci              "type": "class",
13381cb0ef41Sopenharmony_ci              "name": "TransformStream",
13391cb0ef41Sopenharmony_ci              "meta": {
13401cb0ef41Sopenharmony_ci                "added": [
13411cb0ef41Sopenharmony_ci                  "v16.5.0"
13421cb0ef41Sopenharmony_ci                ],
13431cb0ef41Sopenharmony_ci                "changes": [
13441cb0ef41Sopenharmony_ci                  {
13451cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
13461cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
13471cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
13481cb0ef41Sopenharmony_ci                  }
13491cb0ef41Sopenharmony_ci                ]
13501cb0ef41Sopenharmony_ci              },
13511cb0ef41Sopenharmony_ci              "desc": "<p>A <code>TransformStream</code> consists of a <a href=\"webstreams.html#class-readablestream\" class=\"type\">&lt;ReadableStream&gt;</a> and a <a href=\"webstreams.html#class-writablestream\" class=\"type\">&lt;WritableStream&gt;</a> that\nare connected such that the data written to the <code>WritableStream</code> is received,\nand potentially transformed, before being pushed into the <code>ReadableStream</code>'s\nqueue.</p>\n<pre><code class=\"language-mjs\">import {\n  TransformStream,\n} from 'node:stream/web';\n\nconst transform = new TransformStream({\n  transform(chunk, controller) {\n    controller.enqueue(chunk.toUpperCase());\n  },\n});\n\nawait Promise.all([\n  transform.writable.getWriter().write('A'),\n  transform.readable.getReader().read(),\n]);\n</code></pre>",
13521cb0ef41Sopenharmony_ci              "properties": [
13531cb0ef41Sopenharmony_ci                {
13541cb0ef41Sopenharmony_ci                  "textRaw": "`readable` Type: {ReadableStream}",
13551cb0ef41Sopenharmony_ci                  "type": "ReadableStream",
13561cb0ef41Sopenharmony_ci                  "name": "Type",
13571cb0ef41Sopenharmony_ci                  "meta": {
13581cb0ef41Sopenharmony_ci                    "added": [
13591cb0ef41Sopenharmony_ci                      "v16.5.0"
13601cb0ef41Sopenharmony_ci                    ],
13611cb0ef41Sopenharmony_ci                    "changes": []
13621cb0ef41Sopenharmony_ci                  }
13631cb0ef41Sopenharmony_ci                },
13641cb0ef41Sopenharmony_ci                {
13651cb0ef41Sopenharmony_ci                  "textRaw": "`writable` Type: {WritableStream}",
13661cb0ef41Sopenharmony_ci                  "type": "WritableStream",
13671cb0ef41Sopenharmony_ci                  "name": "Type",
13681cb0ef41Sopenharmony_ci                  "meta": {
13691cb0ef41Sopenharmony_ci                    "added": [
13701cb0ef41Sopenharmony_ci                      "v16.5.0"
13711cb0ef41Sopenharmony_ci                    ],
13721cb0ef41Sopenharmony_ci                    "changes": []
13731cb0ef41Sopenharmony_ci                  }
13741cb0ef41Sopenharmony_ci                }
13751cb0ef41Sopenharmony_ci              ],
13761cb0ef41Sopenharmony_ci              "modules": [
13771cb0ef41Sopenharmony_ci                {
13781cb0ef41Sopenharmony_ci                  "textRaw": "Transferring with postMessage()",
13791cb0ef41Sopenharmony_ci                  "name": "transferring_with_postmessage()",
13801cb0ef41Sopenharmony_ci                  "desc": "<p>A <a href=\"webstreams.html#class-transformstream\" class=\"type\">&lt;TransformStream&gt;</a> instance can be transferred using a <a href=\"worker_threads.html#class-messageport\" class=\"type\">&lt;MessagePort&gt;</a>.</p>\n<pre><code class=\"language-js\">const stream = new TransformStream();\n\nconst { port1, port2 } = new MessageChannel();\n\nport1.onmessage = ({ data }) => {\n  const { writable, readable } = data;\n  // ...\n};\n\nport2.postMessage(stream, [stream]);\n</code></pre>",
13811cb0ef41Sopenharmony_ci                  "type": "module",
13821cb0ef41Sopenharmony_ci                  "displayName": "Transferring with postMessage()"
13831cb0ef41Sopenharmony_ci                }
13841cb0ef41Sopenharmony_ci              ],
13851cb0ef41Sopenharmony_ci              "signatures": [
13861cb0ef41Sopenharmony_ci                {
13871cb0ef41Sopenharmony_ci                  "params": [
13881cb0ef41Sopenharmony_ci                    {
13891cb0ef41Sopenharmony_ci                      "textRaw": "`transformer` {Object}",
13901cb0ef41Sopenharmony_ci                      "name": "transformer",
13911cb0ef41Sopenharmony_ci                      "type": "Object",
13921cb0ef41Sopenharmony_ci                      "options": [
13931cb0ef41Sopenharmony_ci                        {
13941cb0ef41Sopenharmony_ci                          "textRaw": "`start` {Function} A user-defined function that is invoked immediately when the `TransformStream` is created.",
13951cb0ef41Sopenharmony_ci                          "name": "start",
13961cb0ef41Sopenharmony_ci                          "type": "Function",
13971cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is invoked immediately when the `TransformStream` is created.",
13981cb0ef41Sopenharmony_ci                          "options": [
13991cb0ef41Sopenharmony_ci                            {
14001cb0ef41Sopenharmony_ci                              "textRaw": "`controller` {TransformStreamDefaultController}",
14011cb0ef41Sopenharmony_ci                              "name": "controller",
14021cb0ef41Sopenharmony_ci                              "type": "TransformStreamDefaultController"
14031cb0ef41Sopenharmony_ci                            },
14041cb0ef41Sopenharmony_ci                            {
14051cb0ef41Sopenharmony_ci                              "textRaw": "Returns: `undefined` or a promise fulfilled with `undefined`",
14061cb0ef41Sopenharmony_ci                              "name": "return",
14071cb0ef41Sopenharmony_ci                              "desc": "`undefined` or a promise fulfilled with `undefined`"
14081cb0ef41Sopenharmony_ci                            }
14091cb0ef41Sopenharmony_ci                          ]
14101cb0ef41Sopenharmony_ci                        },
14111cb0ef41Sopenharmony_ci                        {
14121cb0ef41Sopenharmony_ci                          "textRaw": "`transform` {Function} A user-defined function that receives, and potentially modifies, a chunk of data written to `transformStream.writable`, before forwarding that on to `transformStream.readable`.",
14131cb0ef41Sopenharmony_ci                          "name": "transform",
14141cb0ef41Sopenharmony_ci                          "type": "Function",
14151cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that receives, and potentially modifies, a chunk of data written to `transformStream.writable`, before forwarding that on to `transformStream.readable`.",
14161cb0ef41Sopenharmony_ci                          "options": [
14171cb0ef41Sopenharmony_ci                            {
14181cb0ef41Sopenharmony_ci                              "textRaw": "`chunk` {any}",
14191cb0ef41Sopenharmony_ci                              "name": "chunk",
14201cb0ef41Sopenharmony_ci                              "type": "any"
14211cb0ef41Sopenharmony_ci                            },
14221cb0ef41Sopenharmony_ci                            {
14231cb0ef41Sopenharmony_ci                              "textRaw": "`controller` {TransformStreamDefaultController}",
14241cb0ef41Sopenharmony_ci                              "name": "controller",
14251cb0ef41Sopenharmony_ci                              "type": "TransformStreamDefaultController"
14261cb0ef41Sopenharmony_ci                            },
14271cb0ef41Sopenharmony_ci                            {
14281cb0ef41Sopenharmony_ci                              "textRaw": "Returns: A promise fulfilled with `undefined`.",
14291cb0ef41Sopenharmony_ci                              "name": "return",
14301cb0ef41Sopenharmony_ci                              "desc": "A promise fulfilled with `undefined`."
14311cb0ef41Sopenharmony_ci                            }
14321cb0ef41Sopenharmony_ci                          ]
14331cb0ef41Sopenharmony_ci                        },
14341cb0ef41Sopenharmony_ci                        {
14351cb0ef41Sopenharmony_ci                          "textRaw": "`flush` {Function} A user-defined function that is called immediately before the writable side of the `TransformStream` is closed, signaling the end of the transformation process.",
14361cb0ef41Sopenharmony_ci                          "name": "flush",
14371cb0ef41Sopenharmony_ci                          "type": "Function",
14381cb0ef41Sopenharmony_ci                          "desc": "A user-defined function that is called immediately before the writable side of the `TransformStream` is closed, signaling the end of the transformation process.",
14391cb0ef41Sopenharmony_ci                          "options": [
14401cb0ef41Sopenharmony_ci                            {
14411cb0ef41Sopenharmony_ci                              "textRaw": "`controller` {TransformStreamDefaultController}",
14421cb0ef41Sopenharmony_ci                              "name": "controller",
14431cb0ef41Sopenharmony_ci                              "type": "TransformStreamDefaultController"
14441cb0ef41Sopenharmony_ci                            },
14451cb0ef41Sopenharmony_ci                            {
14461cb0ef41Sopenharmony_ci                              "textRaw": "Returns: A promise fulfilled with `undefined`.",
14471cb0ef41Sopenharmony_ci                              "name": "return",
14481cb0ef41Sopenharmony_ci                              "desc": "A promise fulfilled with `undefined`."
14491cb0ef41Sopenharmony_ci                            }
14501cb0ef41Sopenharmony_ci                          ]
14511cb0ef41Sopenharmony_ci                        },
14521cb0ef41Sopenharmony_ci                        {
14531cb0ef41Sopenharmony_ci                          "textRaw": "`readableType` {any} the `readableType` option is reserved for future use and _must_ be `undefined`.",
14541cb0ef41Sopenharmony_ci                          "name": "readableType",
14551cb0ef41Sopenharmony_ci                          "type": "any",
14561cb0ef41Sopenharmony_ci                          "desc": "the `readableType` option is reserved for future use and _must_ be `undefined`."
14571cb0ef41Sopenharmony_ci                        },
14581cb0ef41Sopenharmony_ci                        {
14591cb0ef41Sopenharmony_ci                          "textRaw": "`writableType` {any} the `writableType` option is reserved for future use and _must_ be `undefined`.",
14601cb0ef41Sopenharmony_ci                          "name": "writableType",
14611cb0ef41Sopenharmony_ci                          "type": "any",
14621cb0ef41Sopenharmony_ci                          "desc": "the `writableType` option is reserved for future use and _must_ be `undefined`."
14631cb0ef41Sopenharmony_ci                        }
14641cb0ef41Sopenharmony_ci                      ]
14651cb0ef41Sopenharmony_ci                    },
14661cb0ef41Sopenharmony_ci                    {
14671cb0ef41Sopenharmony_ci                      "textRaw": "`writableStrategy` {Object}",
14681cb0ef41Sopenharmony_ci                      "name": "writableStrategy",
14691cb0ef41Sopenharmony_ci                      "type": "Object",
14701cb0ef41Sopenharmony_ci                      "options": [
14711cb0ef41Sopenharmony_ci                        {
14721cb0ef41Sopenharmony_ci                          "textRaw": "`highWaterMark` {number} The maximum internal queue size before backpressure is applied.",
14731cb0ef41Sopenharmony_ci                          "name": "highWaterMark",
14741cb0ef41Sopenharmony_ci                          "type": "number",
14751cb0ef41Sopenharmony_ci                          "desc": "The maximum internal queue size before backpressure is applied."
14761cb0ef41Sopenharmony_ci                        },
14771cb0ef41Sopenharmony_ci                        {
14781cb0ef41Sopenharmony_ci                          "textRaw": "`size` {Function} A user-defined function used to identify the size of each chunk of data.",
14791cb0ef41Sopenharmony_ci                          "name": "size",
14801cb0ef41Sopenharmony_ci                          "type": "Function",
14811cb0ef41Sopenharmony_ci                          "desc": "A user-defined function used to identify the size of each chunk of data.",
14821cb0ef41Sopenharmony_ci                          "options": [
14831cb0ef41Sopenharmony_ci                            {
14841cb0ef41Sopenharmony_ci                              "textRaw": "`chunk` {any}",
14851cb0ef41Sopenharmony_ci                              "name": "chunk",
14861cb0ef41Sopenharmony_ci                              "type": "any"
14871cb0ef41Sopenharmony_ci                            },
14881cb0ef41Sopenharmony_ci                            {
14891cb0ef41Sopenharmony_ci                              "textRaw": "Returns: {number}",
14901cb0ef41Sopenharmony_ci                              "name": "return",
14911cb0ef41Sopenharmony_ci                              "type": "number"
14921cb0ef41Sopenharmony_ci                            }
14931cb0ef41Sopenharmony_ci                          ]
14941cb0ef41Sopenharmony_ci                        }
14951cb0ef41Sopenharmony_ci                      ]
14961cb0ef41Sopenharmony_ci                    },
14971cb0ef41Sopenharmony_ci                    {
14981cb0ef41Sopenharmony_ci                      "textRaw": "`readableStrategy` {Object}",
14991cb0ef41Sopenharmony_ci                      "name": "readableStrategy",
15001cb0ef41Sopenharmony_ci                      "type": "Object",
15011cb0ef41Sopenharmony_ci                      "options": [
15021cb0ef41Sopenharmony_ci                        {
15031cb0ef41Sopenharmony_ci                          "textRaw": "`highWaterMark` {number} The maximum internal queue size before backpressure is applied.",
15041cb0ef41Sopenharmony_ci                          "name": "highWaterMark",
15051cb0ef41Sopenharmony_ci                          "type": "number",
15061cb0ef41Sopenharmony_ci                          "desc": "The maximum internal queue size before backpressure is applied."
15071cb0ef41Sopenharmony_ci                        },
15081cb0ef41Sopenharmony_ci                        {
15091cb0ef41Sopenharmony_ci                          "textRaw": "`size` {Function} A user-defined function used to identify the size of each chunk of data.",
15101cb0ef41Sopenharmony_ci                          "name": "size",
15111cb0ef41Sopenharmony_ci                          "type": "Function",
15121cb0ef41Sopenharmony_ci                          "desc": "A user-defined function used to identify the size of each chunk of data.",
15131cb0ef41Sopenharmony_ci                          "options": [
15141cb0ef41Sopenharmony_ci                            {
15151cb0ef41Sopenharmony_ci                              "textRaw": "`chunk` {any}",
15161cb0ef41Sopenharmony_ci                              "name": "chunk",
15171cb0ef41Sopenharmony_ci                              "type": "any"
15181cb0ef41Sopenharmony_ci                            },
15191cb0ef41Sopenharmony_ci                            {
15201cb0ef41Sopenharmony_ci                              "textRaw": "Returns: {number}",
15211cb0ef41Sopenharmony_ci                              "name": "return",
15221cb0ef41Sopenharmony_ci                              "type": "number"
15231cb0ef41Sopenharmony_ci                            }
15241cb0ef41Sopenharmony_ci                          ]
15251cb0ef41Sopenharmony_ci                        }
15261cb0ef41Sopenharmony_ci                      ]
15271cb0ef41Sopenharmony_ci                    }
15281cb0ef41Sopenharmony_ci                  ]
15291cb0ef41Sopenharmony_ci                }
15301cb0ef41Sopenharmony_ci              ]
15311cb0ef41Sopenharmony_ci            },
15321cb0ef41Sopenharmony_ci            {
15331cb0ef41Sopenharmony_ci              "textRaw": "Class: `TransformStreamDefaultController`",
15341cb0ef41Sopenharmony_ci              "type": "class",
15351cb0ef41Sopenharmony_ci              "name": "TransformStreamDefaultController",
15361cb0ef41Sopenharmony_ci              "meta": {
15371cb0ef41Sopenharmony_ci                "added": [
15381cb0ef41Sopenharmony_ci                  "v16.5.0"
15391cb0ef41Sopenharmony_ci                ],
15401cb0ef41Sopenharmony_ci                "changes": [
15411cb0ef41Sopenharmony_ci                  {
15421cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
15431cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
15441cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
15451cb0ef41Sopenharmony_ci                  }
15461cb0ef41Sopenharmony_ci                ]
15471cb0ef41Sopenharmony_ci              },
15481cb0ef41Sopenharmony_ci              "desc": "<p>The <code>TransformStreamDefaultController</code> manages the internal state\nof the <code>TransformStream</code>.</p>",
15491cb0ef41Sopenharmony_ci              "properties": [
15501cb0ef41Sopenharmony_ci                {
15511cb0ef41Sopenharmony_ci                  "textRaw": "`desiredSize` Type: {number}",
15521cb0ef41Sopenharmony_ci                  "type": "number",
15531cb0ef41Sopenharmony_ci                  "name": "Type",
15541cb0ef41Sopenharmony_ci                  "meta": {
15551cb0ef41Sopenharmony_ci                    "added": [
15561cb0ef41Sopenharmony_ci                      "v16.5.0"
15571cb0ef41Sopenharmony_ci                    ],
15581cb0ef41Sopenharmony_ci                    "changes": []
15591cb0ef41Sopenharmony_ci                  },
15601cb0ef41Sopenharmony_ci                  "desc": "<p>The amount of data required to fill the readable side's queue.</p>"
15611cb0ef41Sopenharmony_ci                }
15621cb0ef41Sopenharmony_ci              ],
15631cb0ef41Sopenharmony_ci              "methods": [
15641cb0ef41Sopenharmony_ci                {
15651cb0ef41Sopenharmony_ci                  "textRaw": "`transformStreamDefaultController.enqueue([chunk])`",
15661cb0ef41Sopenharmony_ci                  "type": "method",
15671cb0ef41Sopenharmony_ci                  "name": "enqueue",
15681cb0ef41Sopenharmony_ci                  "meta": {
15691cb0ef41Sopenharmony_ci                    "added": [
15701cb0ef41Sopenharmony_ci                      "v16.5.0"
15711cb0ef41Sopenharmony_ci                    ],
15721cb0ef41Sopenharmony_ci                    "changes": []
15731cb0ef41Sopenharmony_ci                  },
15741cb0ef41Sopenharmony_ci                  "signatures": [
15751cb0ef41Sopenharmony_ci                    {
15761cb0ef41Sopenharmony_ci                      "params": [
15771cb0ef41Sopenharmony_ci                        {
15781cb0ef41Sopenharmony_ci                          "textRaw": "`chunk` {any}",
15791cb0ef41Sopenharmony_ci                          "name": "chunk",
15801cb0ef41Sopenharmony_ci                          "type": "any"
15811cb0ef41Sopenharmony_ci                        }
15821cb0ef41Sopenharmony_ci                      ]
15831cb0ef41Sopenharmony_ci                    }
15841cb0ef41Sopenharmony_ci                  ],
15851cb0ef41Sopenharmony_ci                  "desc": "<p>Appends a chunk of data to the readable side's queue.</p>"
15861cb0ef41Sopenharmony_ci                },
15871cb0ef41Sopenharmony_ci                {
15881cb0ef41Sopenharmony_ci                  "textRaw": "`transformStreamDefaultController.error([reason])`",
15891cb0ef41Sopenharmony_ci                  "type": "method",
15901cb0ef41Sopenharmony_ci                  "name": "error",
15911cb0ef41Sopenharmony_ci                  "meta": {
15921cb0ef41Sopenharmony_ci                    "added": [
15931cb0ef41Sopenharmony_ci                      "v16.5.0"
15941cb0ef41Sopenharmony_ci                    ],
15951cb0ef41Sopenharmony_ci                    "changes": []
15961cb0ef41Sopenharmony_ci                  },
15971cb0ef41Sopenharmony_ci                  "signatures": [
15981cb0ef41Sopenharmony_ci                    {
15991cb0ef41Sopenharmony_ci                      "params": [
16001cb0ef41Sopenharmony_ci                        {
16011cb0ef41Sopenharmony_ci                          "textRaw": "`reason` {any}",
16021cb0ef41Sopenharmony_ci                          "name": "reason",
16031cb0ef41Sopenharmony_ci                          "type": "any"
16041cb0ef41Sopenharmony_ci                        }
16051cb0ef41Sopenharmony_ci                      ]
16061cb0ef41Sopenharmony_ci                    }
16071cb0ef41Sopenharmony_ci                  ],
16081cb0ef41Sopenharmony_ci                  "desc": "<p>Signals to both the readable and writable side that an error has occurred\nwhile processing the transform data, causing both sides to be abruptly\nclosed.</p>"
16091cb0ef41Sopenharmony_ci                },
16101cb0ef41Sopenharmony_ci                {
16111cb0ef41Sopenharmony_ci                  "textRaw": "`transformStreamDefaultController.terminate()`",
16121cb0ef41Sopenharmony_ci                  "type": "method",
16131cb0ef41Sopenharmony_ci                  "name": "terminate",
16141cb0ef41Sopenharmony_ci                  "meta": {
16151cb0ef41Sopenharmony_ci                    "added": [
16161cb0ef41Sopenharmony_ci                      "v16.5.0"
16171cb0ef41Sopenharmony_ci                    ],
16181cb0ef41Sopenharmony_ci                    "changes": []
16191cb0ef41Sopenharmony_ci                  },
16201cb0ef41Sopenharmony_ci                  "signatures": [
16211cb0ef41Sopenharmony_ci                    {
16221cb0ef41Sopenharmony_ci                      "params": []
16231cb0ef41Sopenharmony_ci                    }
16241cb0ef41Sopenharmony_ci                  ],
16251cb0ef41Sopenharmony_ci                  "desc": "<p>Closes the readable side of the transport and causes the writable side\nto be abruptly closed with an error.</p>"
16261cb0ef41Sopenharmony_ci                }
16271cb0ef41Sopenharmony_ci              ]
16281cb0ef41Sopenharmony_ci            },
16291cb0ef41Sopenharmony_ci            {
16301cb0ef41Sopenharmony_ci              "textRaw": "Class: `ByteLengthQueuingStrategy`",
16311cb0ef41Sopenharmony_ci              "type": "class",
16321cb0ef41Sopenharmony_ci              "name": "ByteLengthQueuingStrategy",
16331cb0ef41Sopenharmony_ci              "meta": {
16341cb0ef41Sopenharmony_ci                "added": [
16351cb0ef41Sopenharmony_ci                  "v16.5.0"
16361cb0ef41Sopenharmony_ci                ],
16371cb0ef41Sopenharmony_ci                "changes": [
16381cb0ef41Sopenharmony_ci                  {
16391cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
16401cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
16411cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
16421cb0ef41Sopenharmony_ci                  }
16431cb0ef41Sopenharmony_ci                ]
16441cb0ef41Sopenharmony_ci              },
16451cb0ef41Sopenharmony_ci              "properties": [
16461cb0ef41Sopenharmony_ci                {
16471cb0ef41Sopenharmony_ci                  "textRaw": "`highWaterMark` Type: {number}",
16481cb0ef41Sopenharmony_ci                  "type": "number",
16491cb0ef41Sopenharmony_ci                  "name": "Type",
16501cb0ef41Sopenharmony_ci                  "meta": {
16511cb0ef41Sopenharmony_ci                    "added": [
16521cb0ef41Sopenharmony_ci                      "v16.5.0"
16531cb0ef41Sopenharmony_ci                    ],
16541cb0ef41Sopenharmony_ci                    "changes": []
16551cb0ef41Sopenharmony_ci                  }
16561cb0ef41Sopenharmony_ci                },
16571cb0ef41Sopenharmony_ci                {
16581cb0ef41Sopenharmony_ci                  "textRaw": "`size` Type: {Function}",
16591cb0ef41Sopenharmony_ci                  "type": "Function",
16601cb0ef41Sopenharmony_ci                  "name": "Type",
16611cb0ef41Sopenharmony_ci                  "meta": {
16621cb0ef41Sopenharmony_ci                    "added": [
16631cb0ef41Sopenharmony_ci                      "v16.5.0"
16641cb0ef41Sopenharmony_ci                    ],
16651cb0ef41Sopenharmony_ci                    "changes": []
16661cb0ef41Sopenharmony_ci                  },
16671cb0ef41Sopenharmony_ci                  "options": [
16681cb0ef41Sopenharmony_ci                    {
16691cb0ef41Sopenharmony_ci                      "textRaw": "`chunk` {any}",
16701cb0ef41Sopenharmony_ci                      "name": "chunk",
16711cb0ef41Sopenharmony_ci                      "type": "any"
16721cb0ef41Sopenharmony_ci                    },
16731cb0ef41Sopenharmony_ci                    {
16741cb0ef41Sopenharmony_ci                      "textRaw": "Returns: {number}",
16751cb0ef41Sopenharmony_ci                      "name": "return",
16761cb0ef41Sopenharmony_ci                      "type": "number"
16771cb0ef41Sopenharmony_ci                    }
16781cb0ef41Sopenharmony_ci                  ]
16791cb0ef41Sopenharmony_ci                }
16801cb0ef41Sopenharmony_ci              ],
16811cb0ef41Sopenharmony_ci              "signatures": [
16821cb0ef41Sopenharmony_ci                {
16831cb0ef41Sopenharmony_ci                  "params": [
16841cb0ef41Sopenharmony_ci                    {
16851cb0ef41Sopenharmony_ci                      "textRaw": "`init` {Object}",
16861cb0ef41Sopenharmony_ci                      "name": "init",
16871cb0ef41Sopenharmony_ci                      "type": "Object",
16881cb0ef41Sopenharmony_ci                      "options": [
16891cb0ef41Sopenharmony_ci                        {
16901cb0ef41Sopenharmony_ci                          "textRaw": "`highWaterMark` {number}",
16911cb0ef41Sopenharmony_ci                          "name": "highWaterMark",
16921cb0ef41Sopenharmony_ci                          "type": "number"
16931cb0ef41Sopenharmony_ci                        }
16941cb0ef41Sopenharmony_ci                      ]
16951cb0ef41Sopenharmony_ci                    }
16961cb0ef41Sopenharmony_ci                  ]
16971cb0ef41Sopenharmony_ci                }
16981cb0ef41Sopenharmony_ci              ]
16991cb0ef41Sopenharmony_ci            },
17001cb0ef41Sopenharmony_ci            {
17011cb0ef41Sopenharmony_ci              "textRaw": "Class: `CountQueuingStrategy`",
17021cb0ef41Sopenharmony_ci              "type": "class",
17031cb0ef41Sopenharmony_ci              "name": "CountQueuingStrategy",
17041cb0ef41Sopenharmony_ci              "meta": {
17051cb0ef41Sopenharmony_ci                "added": [
17061cb0ef41Sopenharmony_ci                  "v16.5.0"
17071cb0ef41Sopenharmony_ci                ],
17081cb0ef41Sopenharmony_ci                "changes": [
17091cb0ef41Sopenharmony_ci                  {
17101cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
17111cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
17121cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
17131cb0ef41Sopenharmony_ci                  }
17141cb0ef41Sopenharmony_ci                ]
17151cb0ef41Sopenharmony_ci              },
17161cb0ef41Sopenharmony_ci              "properties": [
17171cb0ef41Sopenharmony_ci                {
17181cb0ef41Sopenharmony_ci                  "textRaw": "`highWaterMark` Type: {number}",
17191cb0ef41Sopenharmony_ci                  "type": "number",
17201cb0ef41Sopenharmony_ci                  "name": "Type",
17211cb0ef41Sopenharmony_ci                  "meta": {
17221cb0ef41Sopenharmony_ci                    "added": [
17231cb0ef41Sopenharmony_ci                      "v16.5.0"
17241cb0ef41Sopenharmony_ci                    ],
17251cb0ef41Sopenharmony_ci                    "changes": []
17261cb0ef41Sopenharmony_ci                  }
17271cb0ef41Sopenharmony_ci                },
17281cb0ef41Sopenharmony_ci                {
17291cb0ef41Sopenharmony_ci                  "textRaw": "`size` Type: {Function}",
17301cb0ef41Sopenharmony_ci                  "type": "Function",
17311cb0ef41Sopenharmony_ci                  "name": "Type",
17321cb0ef41Sopenharmony_ci                  "meta": {
17331cb0ef41Sopenharmony_ci                    "added": [
17341cb0ef41Sopenharmony_ci                      "v16.5.0"
17351cb0ef41Sopenharmony_ci                    ],
17361cb0ef41Sopenharmony_ci                    "changes": []
17371cb0ef41Sopenharmony_ci                  },
17381cb0ef41Sopenharmony_ci                  "options": [
17391cb0ef41Sopenharmony_ci                    {
17401cb0ef41Sopenharmony_ci                      "textRaw": "`chunk` {any}",
17411cb0ef41Sopenharmony_ci                      "name": "chunk",
17421cb0ef41Sopenharmony_ci                      "type": "any"
17431cb0ef41Sopenharmony_ci                    },
17441cb0ef41Sopenharmony_ci                    {
17451cb0ef41Sopenharmony_ci                      "textRaw": "Returns: {number}",
17461cb0ef41Sopenharmony_ci                      "name": "return",
17471cb0ef41Sopenharmony_ci                      "type": "number"
17481cb0ef41Sopenharmony_ci                    }
17491cb0ef41Sopenharmony_ci                  ]
17501cb0ef41Sopenharmony_ci                }
17511cb0ef41Sopenharmony_ci              ],
17521cb0ef41Sopenharmony_ci              "signatures": [
17531cb0ef41Sopenharmony_ci                {
17541cb0ef41Sopenharmony_ci                  "params": [
17551cb0ef41Sopenharmony_ci                    {
17561cb0ef41Sopenharmony_ci                      "textRaw": "`init` {Object}",
17571cb0ef41Sopenharmony_ci                      "name": "init",
17581cb0ef41Sopenharmony_ci                      "type": "Object",
17591cb0ef41Sopenharmony_ci                      "options": [
17601cb0ef41Sopenharmony_ci                        {
17611cb0ef41Sopenharmony_ci                          "textRaw": "`highWaterMark` {number}",
17621cb0ef41Sopenharmony_ci                          "name": "highWaterMark",
17631cb0ef41Sopenharmony_ci                          "type": "number"
17641cb0ef41Sopenharmony_ci                        }
17651cb0ef41Sopenharmony_ci                      ]
17661cb0ef41Sopenharmony_ci                    }
17671cb0ef41Sopenharmony_ci                  ]
17681cb0ef41Sopenharmony_ci                }
17691cb0ef41Sopenharmony_ci              ]
17701cb0ef41Sopenharmony_ci            },
17711cb0ef41Sopenharmony_ci            {
17721cb0ef41Sopenharmony_ci              "textRaw": "Class: `TextEncoderStream`",
17731cb0ef41Sopenharmony_ci              "type": "class",
17741cb0ef41Sopenharmony_ci              "name": "TextEncoderStream",
17751cb0ef41Sopenharmony_ci              "meta": {
17761cb0ef41Sopenharmony_ci                "added": [
17771cb0ef41Sopenharmony_ci                  "v16.6.0"
17781cb0ef41Sopenharmony_ci                ],
17791cb0ef41Sopenharmony_ci                "changes": [
17801cb0ef41Sopenharmony_ci                  {
17811cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
17821cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
17831cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
17841cb0ef41Sopenharmony_ci                  }
17851cb0ef41Sopenharmony_ci                ]
17861cb0ef41Sopenharmony_ci              },
17871cb0ef41Sopenharmony_ci              "properties": [
17881cb0ef41Sopenharmony_ci                {
17891cb0ef41Sopenharmony_ci                  "textRaw": "`encoding` Type: {string}",
17901cb0ef41Sopenharmony_ci                  "type": "string",
17911cb0ef41Sopenharmony_ci                  "name": "Type",
17921cb0ef41Sopenharmony_ci                  "meta": {
17931cb0ef41Sopenharmony_ci                    "added": [
17941cb0ef41Sopenharmony_ci                      "v16.6.0"
17951cb0ef41Sopenharmony_ci                    ],
17961cb0ef41Sopenharmony_ci                    "changes": []
17971cb0ef41Sopenharmony_ci                  },
17981cb0ef41Sopenharmony_ci                  "desc": "<p>The encoding supported by the <code>TextEncoderStream</code> instance.</p>"
17991cb0ef41Sopenharmony_ci                },
18001cb0ef41Sopenharmony_ci                {
18011cb0ef41Sopenharmony_ci                  "textRaw": "`readable` Type: {ReadableStream}",
18021cb0ef41Sopenharmony_ci                  "type": "ReadableStream",
18031cb0ef41Sopenharmony_ci                  "name": "Type",
18041cb0ef41Sopenharmony_ci                  "meta": {
18051cb0ef41Sopenharmony_ci                    "added": [
18061cb0ef41Sopenharmony_ci                      "v16.6.0"
18071cb0ef41Sopenharmony_ci                    ],
18081cb0ef41Sopenharmony_ci                    "changes": []
18091cb0ef41Sopenharmony_ci                  }
18101cb0ef41Sopenharmony_ci                },
18111cb0ef41Sopenharmony_ci                {
18121cb0ef41Sopenharmony_ci                  "textRaw": "`writable` Type: {WritableStream}",
18131cb0ef41Sopenharmony_ci                  "type": "WritableStream",
18141cb0ef41Sopenharmony_ci                  "name": "Type",
18151cb0ef41Sopenharmony_ci                  "meta": {
18161cb0ef41Sopenharmony_ci                    "added": [
18171cb0ef41Sopenharmony_ci                      "v16.6.0"
18181cb0ef41Sopenharmony_ci                    ],
18191cb0ef41Sopenharmony_ci                    "changes": []
18201cb0ef41Sopenharmony_ci                  }
18211cb0ef41Sopenharmony_ci                }
18221cb0ef41Sopenharmony_ci              ],
18231cb0ef41Sopenharmony_ci              "signatures": [
18241cb0ef41Sopenharmony_ci                {
18251cb0ef41Sopenharmony_ci                  "params": [],
18261cb0ef41Sopenharmony_ci                  "desc": "<p>Creates a new <code>TextEncoderStream</code> instance.</p>"
18271cb0ef41Sopenharmony_ci                }
18281cb0ef41Sopenharmony_ci              ]
18291cb0ef41Sopenharmony_ci            },
18301cb0ef41Sopenharmony_ci            {
18311cb0ef41Sopenharmony_ci              "textRaw": "Class: `TextDecoderStream`",
18321cb0ef41Sopenharmony_ci              "type": "class",
18331cb0ef41Sopenharmony_ci              "name": "TextDecoderStream",
18341cb0ef41Sopenharmony_ci              "meta": {
18351cb0ef41Sopenharmony_ci                "added": [
18361cb0ef41Sopenharmony_ci                  "v16.6.0"
18371cb0ef41Sopenharmony_ci                ],
18381cb0ef41Sopenharmony_ci                "changes": [
18391cb0ef41Sopenharmony_ci                  {
18401cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
18411cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
18421cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
18431cb0ef41Sopenharmony_ci                  }
18441cb0ef41Sopenharmony_ci                ]
18451cb0ef41Sopenharmony_ci              },
18461cb0ef41Sopenharmony_ci              "properties": [
18471cb0ef41Sopenharmony_ci                {
18481cb0ef41Sopenharmony_ci                  "textRaw": "`encoding` Type: {string}",
18491cb0ef41Sopenharmony_ci                  "type": "string",
18501cb0ef41Sopenharmony_ci                  "name": "Type",
18511cb0ef41Sopenharmony_ci                  "meta": {
18521cb0ef41Sopenharmony_ci                    "added": [
18531cb0ef41Sopenharmony_ci                      "v16.6.0"
18541cb0ef41Sopenharmony_ci                    ],
18551cb0ef41Sopenharmony_ci                    "changes": []
18561cb0ef41Sopenharmony_ci                  },
18571cb0ef41Sopenharmony_ci                  "desc": "<p>The encoding supported by the <code>TextDecoderStream</code> instance.</p>"
18581cb0ef41Sopenharmony_ci                },
18591cb0ef41Sopenharmony_ci                {
18601cb0ef41Sopenharmony_ci                  "textRaw": "`fatal` Type: {boolean}",
18611cb0ef41Sopenharmony_ci                  "type": "boolean",
18621cb0ef41Sopenharmony_ci                  "name": "Type",
18631cb0ef41Sopenharmony_ci                  "meta": {
18641cb0ef41Sopenharmony_ci                    "added": [
18651cb0ef41Sopenharmony_ci                      "v16.6.0"
18661cb0ef41Sopenharmony_ci                    ],
18671cb0ef41Sopenharmony_ci                    "changes": []
18681cb0ef41Sopenharmony_ci                  },
18691cb0ef41Sopenharmony_ci                  "desc": "<p>The value will be <code>true</code> if decoding errors result in a <code>TypeError</code> being\nthrown.</p>"
18701cb0ef41Sopenharmony_ci                },
18711cb0ef41Sopenharmony_ci                {
18721cb0ef41Sopenharmony_ci                  "textRaw": "`ignoreBOM` Type: {boolean}",
18731cb0ef41Sopenharmony_ci                  "type": "boolean",
18741cb0ef41Sopenharmony_ci                  "name": "Type",
18751cb0ef41Sopenharmony_ci                  "meta": {
18761cb0ef41Sopenharmony_ci                    "added": [
18771cb0ef41Sopenharmony_ci                      "v16.6.0"
18781cb0ef41Sopenharmony_ci                    ],
18791cb0ef41Sopenharmony_ci                    "changes": []
18801cb0ef41Sopenharmony_ci                  },
18811cb0ef41Sopenharmony_ci                  "desc": "<p>The value will be <code>true</code> if the decoding result will include the byte order\nmark.</p>"
18821cb0ef41Sopenharmony_ci                },
18831cb0ef41Sopenharmony_ci                {
18841cb0ef41Sopenharmony_ci                  "textRaw": "`readable` Type: {ReadableStream}",
18851cb0ef41Sopenharmony_ci                  "type": "ReadableStream",
18861cb0ef41Sopenharmony_ci                  "name": "Type",
18871cb0ef41Sopenharmony_ci                  "meta": {
18881cb0ef41Sopenharmony_ci                    "added": [
18891cb0ef41Sopenharmony_ci                      "v16.6.0"
18901cb0ef41Sopenharmony_ci                    ],
18911cb0ef41Sopenharmony_ci                    "changes": []
18921cb0ef41Sopenharmony_ci                  }
18931cb0ef41Sopenharmony_ci                },
18941cb0ef41Sopenharmony_ci                {
18951cb0ef41Sopenharmony_ci                  "textRaw": "`writable` Type: {WritableStream}",
18961cb0ef41Sopenharmony_ci                  "type": "WritableStream",
18971cb0ef41Sopenharmony_ci                  "name": "Type",
18981cb0ef41Sopenharmony_ci                  "meta": {
18991cb0ef41Sopenharmony_ci                    "added": [
19001cb0ef41Sopenharmony_ci                      "v16.6.0"
19011cb0ef41Sopenharmony_ci                    ],
19021cb0ef41Sopenharmony_ci                    "changes": []
19031cb0ef41Sopenharmony_ci                  }
19041cb0ef41Sopenharmony_ci                }
19051cb0ef41Sopenharmony_ci              ],
19061cb0ef41Sopenharmony_ci              "signatures": [
19071cb0ef41Sopenharmony_ci                {
19081cb0ef41Sopenharmony_ci                  "params": [
19091cb0ef41Sopenharmony_ci                    {
19101cb0ef41Sopenharmony_ci                      "textRaw": "`encoding` {string} Identifies the `encoding` that this `TextDecoder` instance supports. **Default:** `'utf-8'`.",
19111cb0ef41Sopenharmony_ci                      "name": "encoding",
19121cb0ef41Sopenharmony_ci                      "type": "string",
19131cb0ef41Sopenharmony_ci                      "default": "`'utf-8'`",
19141cb0ef41Sopenharmony_ci                      "desc": "Identifies the `encoding` that this `TextDecoder` instance supports."
19151cb0ef41Sopenharmony_ci                    },
19161cb0ef41Sopenharmony_ci                    {
19171cb0ef41Sopenharmony_ci                      "textRaw": "`options` {Object}",
19181cb0ef41Sopenharmony_ci                      "name": "options",
19191cb0ef41Sopenharmony_ci                      "type": "Object",
19201cb0ef41Sopenharmony_ci                      "options": [
19211cb0ef41Sopenharmony_ci                        {
19221cb0ef41Sopenharmony_ci                          "textRaw": "`fatal` {boolean} `true` if decoding failures are fatal.",
19231cb0ef41Sopenharmony_ci                          "name": "fatal",
19241cb0ef41Sopenharmony_ci                          "type": "boolean",
19251cb0ef41Sopenharmony_ci                          "desc": "`true` if decoding failures are fatal."
19261cb0ef41Sopenharmony_ci                        },
19271cb0ef41Sopenharmony_ci                        {
19281cb0ef41Sopenharmony_ci                          "textRaw": "`ignoreBOM` {boolean} When `true`, the `TextDecoderStream` will include the byte order mark in the decoded result. When `false`, the byte order mark will be removed from the output. This option is only used when `encoding` is `'utf-8'`, `'utf-16be'`, or `'utf-16le'`. **Default:** `false`.",
19291cb0ef41Sopenharmony_ci                          "name": "ignoreBOM",
19301cb0ef41Sopenharmony_ci                          "type": "boolean",
19311cb0ef41Sopenharmony_ci                          "default": "`false`",
19321cb0ef41Sopenharmony_ci                          "desc": "When `true`, the `TextDecoderStream` will include the byte order mark in the decoded result. When `false`, the byte order mark will be removed from the output. This option is only used when `encoding` is `'utf-8'`, `'utf-16be'`, or `'utf-16le'`."
19331cb0ef41Sopenharmony_ci                        }
19341cb0ef41Sopenharmony_ci                      ]
19351cb0ef41Sopenharmony_ci                    }
19361cb0ef41Sopenharmony_ci                  ],
19371cb0ef41Sopenharmony_ci                  "desc": "<p>Creates a new <code>TextDecoderStream</code> instance.</p>"
19381cb0ef41Sopenharmony_ci                }
19391cb0ef41Sopenharmony_ci              ]
19401cb0ef41Sopenharmony_ci            },
19411cb0ef41Sopenharmony_ci            {
19421cb0ef41Sopenharmony_ci              "textRaw": "Class: `CompressionStream`",
19431cb0ef41Sopenharmony_ci              "type": "class",
19441cb0ef41Sopenharmony_ci              "name": "CompressionStream",
19451cb0ef41Sopenharmony_ci              "meta": {
19461cb0ef41Sopenharmony_ci                "added": [
19471cb0ef41Sopenharmony_ci                  "v17.0.0"
19481cb0ef41Sopenharmony_ci                ],
19491cb0ef41Sopenharmony_ci                "changes": [
19501cb0ef41Sopenharmony_ci                  {
19511cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
19521cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
19531cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
19541cb0ef41Sopenharmony_ci                  }
19551cb0ef41Sopenharmony_ci                ]
19561cb0ef41Sopenharmony_ci              },
19571cb0ef41Sopenharmony_ci              "properties": [
19581cb0ef41Sopenharmony_ci                {
19591cb0ef41Sopenharmony_ci                  "textRaw": "`readable` Type: {ReadableStream}",
19601cb0ef41Sopenharmony_ci                  "type": "ReadableStream",
19611cb0ef41Sopenharmony_ci                  "name": "Type",
19621cb0ef41Sopenharmony_ci                  "meta": {
19631cb0ef41Sopenharmony_ci                    "added": [
19641cb0ef41Sopenharmony_ci                      "v17.0.0"
19651cb0ef41Sopenharmony_ci                    ],
19661cb0ef41Sopenharmony_ci                    "changes": []
19671cb0ef41Sopenharmony_ci                  }
19681cb0ef41Sopenharmony_ci                },
19691cb0ef41Sopenharmony_ci                {
19701cb0ef41Sopenharmony_ci                  "textRaw": "`writable` Type: {WritableStream}",
19711cb0ef41Sopenharmony_ci                  "type": "WritableStream",
19721cb0ef41Sopenharmony_ci                  "name": "Type",
19731cb0ef41Sopenharmony_ci                  "meta": {
19741cb0ef41Sopenharmony_ci                    "added": [
19751cb0ef41Sopenharmony_ci                      "v17.0.0"
19761cb0ef41Sopenharmony_ci                    ],
19771cb0ef41Sopenharmony_ci                    "changes": []
19781cb0ef41Sopenharmony_ci                  }
19791cb0ef41Sopenharmony_ci                }
19801cb0ef41Sopenharmony_ci              ],
19811cb0ef41Sopenharmony_ci              "signatures": [
19821cb0ef41Sopenharmony_ci                {
19831cb0ef41Sopenharmony_ci                  "params": [
19841cb0ef41Sopenharmony_ci                    {
19851cb0ef41Sopenharmony_ci                      "textRaw": "`format` {string} One of either `'deflate'` or `'gzip'`.",
19861cb0ef41Sopenharmony_ci                      "name": "format",
19871cb0ef41Sopenharmony_ci                      "type": "string",
19881cb0ef41Sopenharmony_ci                      "desc": "One of either `'deflate'` or `'gzip'`."
19891cb0ef41Sopenharmony_ci                    }
19901cb0ef41Sopenharmony_ci                  ]
19911cb0ef41Sopenharmony_ci                }
19921cb0ef41Sopenharmony_ci              ]
19931cb0ef41Sopenharmony_ci            },
19941cb0ef41Sopenharmony_ci            {
19951cb0ef41Sopenharmony_ci              "textRaw": "Class: `DecompressionStream`",
19961cb0ef41Sopenharmony_ci              "type": "class",
19971cb0ef41Sopenharmony_ci              "name": "DecompressionStream",
19981cb0ef41Sopenharmony_ci              "meta": {
19991cb0ef41Sopenharmony_ci                "added": [
20001cb0ef41Sopenharmony_ci                  "v17.0.0"
20011cb0ef41Sopenharmony_ci                ],
20021cb0ef41Sopenharmony_ci                "changes": [
20031cb0ef41Sopenharmony_ci                  {
20041cb0ef41Sopenharmony_ci                    "version": "v18.0.0",
20051cb0ef41Sopenharmony_ci                    "pr-url": "https://github.com/nodejs/node/pull/42225",
20061cb0ef41Sopenharmony_ci                    "description": "This class is now exposed on the global object."
20071cb0ef41Sopenharmony_ci                  }
20081cb0ef41Sopenharmony_ci                ]
20091cb0ef41Sopenharmony_ci              },
20101cb0ef41Sopenharmony_ci              "properties": [
20111cb0ef41Sopenharmony_ci                {
20121cb0ef41Sopenharmony_ci                  "textRaw": "`readable` Type: {ReadableStream}",
20131cb0ef41Sopenharmony_ci                  "type": "ReadableStream",
20141cb0ef41Sopenharmony_ci                  "name": "Type",
20151cb0ef41Sopenharmony_ci                  "meta": {
20161cb0ef41Sopenharmony_ci                    "added": [
20171cb0ef41Sopenharmony_ci                      "v17.0.0"
20181cb0ef41Sopenharmony_ci                    ],
20191cb0ef41Sopenharmony_ci                    "changes": []
20201cb0ef41Sopenharmony_ci                  }
20211cb0ef41Sopenharmony_ci                },
20221cb0ef41Sopenharmony_ci                {
20231cb0ef41Sopenharmony_ci                  "textRaw": "`writable` Type: {WritableStream}",
20241cb0ef41Sopenharmony_ci                  "type": "WritableStream",
20251cb0ef41Sopenharmony_ci                  "name": "Type",
20261cb0ef41Sopenharmony_ci                  "meta": {
20271cb0ef41Sopenharmony_ci                    "added": [
20281cb0ef41Sopenharmony_ci                      "v17.0.0"
20291cb0ef41Sopenharmony_ci                    ],
20301cb0ef41Sopenharmony_ci                    "changes": []
20311cb0ef41Sopenharmony_ci                  }
20321cb0ef41Sopenharmony_ci                }
20331cb0ef41Sopenharmony_ci              ],
20341cb0ef41Sopenharmony_ci              "signatures": [
20351cb0ef41Sopenharmony_ci                {
20361cb0ef41Sopenharmony_ci                  "params": [
20371cb0ef41Sopenharmony_ci                    {
20381cb0ef41Sopenharmony_ci                      "textRaw": "`format` {string} One of either `'deflate'` or `'gzip'`.",
20391cb0ef41Sopenharmony_ci                      "name": "format",
20401cb0ef41Sopenharmony_ci                      "type": "string",
20411cb0ef41Sopenharmony_ci                      "desc": "One of either `'deflate'` or `'gzip'`."
20421cb0ef41Sopenharmony_ci                    }
20431cb0ef41Sopenharmony_ci                  ]
20441cb0ef41Sopenharmony_ci                }
20451cb0ef41Sopenharmony_ci              ]
20461cb0ef41Sopenharmony_ci            }
20471cb0ef41Sopenharmony_ci          ],
20481cb0ef41Sopenharmony_ci          "modules": [
20491cb0ef41Sopenharmony_ci            {
20501cb0ef41Sopenharmony_ci              "textRaw": "Utility Consumers",
20511cb0ef41Sopenharmony_ci              "name": "utility_consumers",
20521cb0ef41Sopenharmony_ci              "meta": {
20531cb0ef41Sopenharmony_ci                "added": [
20541cb0ef41Sopenharmony_ci                  "v16.7.0"
20551cb0ef41Sopenharmony_ci                ],
20561cb0ef41Sopenharmony_ci                "changes": []
20571cb0ef41Sopenharmony_ci              },
20581cb0ef41Sopenharmony_ci              "desc": "<p>The utility consumer functions provide common options for consuming\nstreams.</p>\n<p>They are accessed using:</p>\n<pre><code class=\"language-mjs\">import {\n  arrayBuffer,\n  blob,\n  buffer,\n  json,\n  text,\n} from 'node:stream/consumers';\n</code></pre>\n<pre><code class=\"language-cjs\">const {\n  arrayBuffer,\n  blob,\n  buffer,\n  json,\n  text,\n} = require('node:stream/consumers');\n</code></pre>",
20591cb0ef41Sopenharmony_ci              "methods": [
20601cb0ef41Sopenharmony_ci                {
20611cb0ef41Sopenharmony_ci                  "textRaw": "`streamConsumers.arrayBuffer(stream)`",
20621cb0ef41Sopenharmony_ci                  "type": "method",
20631cb0ef41Sopenharmony_ci                  "name": "arrayBuffer",
20641cb0ef41Sopenharmony_ci                  "meta": {
20651cb0ef41Sopenharmony_ci                    "added": [
20661cb0ef41Sopenharmony_ci                      "v16.7.0"
20671cb0ef41Sopenharmony_ci                    ],
20681cb0ef41Sopenharmony_ci                    "changes": []
20691cb0ef41Sopenharmony_ci                  },
20701cb0ef41Sopenharmony_ci                  "signatures": [
20711cb0ef41Sopenharmony_ci                    {
20721cb0ef41Sopenharmony_ci                      "return": {
20731cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {Promise} Fulfills with an `ArrayBuffer` containing the full contents of the stream.",
20741cb0ef41Sopenharmony_ci                        "name": "return",
20751cb0ef41Sopenharmony_ci                        "type": "Promise",
20761cb0ef41Sopenharmony_ci                        "desc": "Fulfills with an `ArrayBuffer` containing the full contents of the stream."
20771cb0ef41Sopenharmony_ci                      },
20781cb0ef41Sopenharmony_ci                      "params": [
20791cb0ef41Sopenharmony_ci                        {
20801cb0ef41Sopenharmony_ci                          "textRaw": "`stream` {ReadableStream|stream.Readable|AsyncIterator}",
20811cb0ef41Sopenharmony_ci                          "name": "stream",
20821cb0ef41Sopenharmony_ci                          "type": "ReadableStream|stream.Readable|AsyncIterator"
20831cb0ef41Sopenharmony_ci                        }
20841cb0ef41Sopenharmony_ci                      ]
20851cb0ef41Sopenharmony_ci                    }
20861cb0ef41Sopenharmony_ci                  ],
20871cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { arrayBuffer } from 'node:stream/consumers';\nimport { Readable } from 'node:stream';\nimport { TextEncoder } from 'node:util';\n\nconst encoder = new TextEncoder();\nconst dataArray = encoder.encode('hello world from consumers!');\n\nconst readable = Readable.from(dataArray);\nconst data = await arrayBuffer(readable);\nconsole.log(`from readable: ${data.byteLength}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { arrayBuffer } = require('node:stream/consumers');\nconst { Readable } = require('node:stream');\nconst { TextEncoder } = require('node:util');\n\nconst encoder = new TextEncoder();\nconst dataArray = encoder.encode('hello world from consumers!');\nconst readable = Readable.from(dataArray);\narrayBuffer(readable).then((data) => {\n  console.log(`from readable: ${data.byteLength}`);\n});\n</code></pre>"
20881cb0ef41Sopenharmony_ci                },
20891cb0ef41Sopenharmony_ci                {
20901cb0ef41Sopenharmony_ci                  "textRaw": "`streamConsumers.blob(stream)`",
20911cb0ef41Sopenharmony_ci                  "type": "method",
20921cb0ef41Sopenharmony_ci                  "name": "blob",
20931cb0ef41Sopenharmony_ci                  "meta": {
20941cb0ef41Sopenharmony_ci                    "added": [
20951cb0ef41Sopenharmony_ci                      "v16.7.0"
20961cb0ef41Sopenharmony_ci                    ],
20971cb0ef41Sopenharmony_ci                    "changes": []
20981cb0ef41Sopenharmony_ci                  },
20991cb0ef41Sopenharmony_ci                  "signatures": [
21001cb0ef41Sopenharmony_ci                    {
21011cb0ef41Sopenharmony_ci                      "return": {
21021cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {Promise} Fulfills with a {Blob} containing the full contents of the stream.",
21031cb0ef41Sopenharmony_ci                        "name": "return",
21041cb0ef41Sopenharmony_ci                        "type": "Promise",
21051cb0ef41Sopenharmony_ci                        "desc": "Fulfills with a {Blob} containing the full contents of the stream."
21061cb0ef41Sopenharmony_ci                      },
21071cb0ef41Sopenharmony_ci                      "params": [
21081cb0ef41Sopenharmony_ci                        {
21091cb0ef41Sopenharmony_ci                          "textRaw": "`stream` {ReadableStream|stream.Readable|AsyncIterator}",
21101cb0ef41Sopenharmony_ci                          "name": "stream",
21111cb0ef41Sopenharmony_ci                          "type": "ReadableStream|stream.Readable|AsyncIterator"
21121cb0ef41Sopenharmony_ci                        }
21131cb0ef41Sopenharmony_ci                      ]
21141cb0ef41Sopenharmony_ci                    }
21151cb0ef41Sopenharmony_ci                  ],
21161cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { blob } from 'node:stream/consumers';\n\nconst dataBlob = new Blob(['hello world from consumers!']);\n\nconst readable = dataBlob.stream();\nconst data = await blob(readable);\nconsole.log(`from readable: ${data.size}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { blob } = require('node:stream/consumers');\n\nconst dataBlob = new Blob(['hello world from consumers!']);\n\nconst readable = dataBlob.stream();\nblob(readable).then((data) => {\n  console.log(`from readable: ${data.size}`);\n});\n</code></pre>"
21171cb0ef41Sopenharmony_ci                },
21181cb0ef41Sopenharmony_ci                {
21191cb0ef41Sopenharmony_ci                  "textRaw": "`streamConsumers.buffer(stream)`",
21201cb0ef41Sopenharmony_ci                  "type": "method",
21211cb0ef41Sopenharmony_ci                  "name": "buffer",
21221cb0ef41Sopenharmony_ci                  "meta": {
21231cb0ef41Sopenharmony_ci                    "added": [
21241cb0ef41Sopenharmony_ci                      "v16.7.0"
21251cb0ef41Sopenharmony_ci                    ],
21261cb0ef41Sopenharmony_ci                    "changes": []
21271cb0ef41Sopenharmony_ci                  },
21281cb0ef41Sopenharmony_ci                  "signatures": [
21291cb0ef41Sopenharmony_ci                    {
21301cb0ef41Sopenharmony_ci                      "return": {
21311cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {Promise} Fulfills with a {Buffer} containing the full contents of the stream.",
21321cb0ef41Sopenharmony_ci                        "name": "return",
21331cb0ef41Sopenharmony_ci                        "type": "Promise",
21341cb0ef41Sopenharmony_ci                        "desc": "Fulfills with a {Buffer} containing the full contents of the stream."
21351cb0ef41Sopenharmony_ci                      },
21361cb0ef41Sopenharmony_ci                      "params": [
21371cb0ef41Sopenharmony_ci                        {
21381cb0ef41Sopenharmony_ci                          "textRaw": "`stream` {ReadableStream|stream.Readable|AsyncIterator}",
21391cb0ef41Sopenharmony_ci                          "name": "stream",
21401cb0ef41Sopenharmony_ci                          "type": "ReadableStream|stream.Readable|AsyncIterator"
21411cb0ef41Sopenharmony_ci                        }
21421cb0ef41Sopenharmony_ci                      ]
21431cb0ef41Sopenharmony_ci                    }
21441cb0ef41Sopenharmony_ci                  ],
21451cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { buffer } from 'node:stream/consumers';\nimport { Readable } from 'node:stream';\nimport { Buffer } from 'node:buffer';\n\nconst dataBuffer = Buffer.from('hello world from consumers!');\n\nconst readable = Readable.from(dataBuffer);\nconst data = await buffer(readable);\nconsole.log(`from readable: ${data.length}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { buffer } = require('node:stream/consumers');\nconst { Readable } = require('node:stream');\nconst { Buffer } = require('node:buffer');\n\nconst dataBuffer = Buffer.from('hello world from consumers!');\n\nconst readable = Readable.from(dataBuffer);\nbuffer(readable).then((data) => {\n  console.log(`from readable: ${data.length}`);\n});\n</code></pre>"
21461cb0ef41Sopenharmony_ci                },
21471cb0ef41Sopenharmony_ci                {
21481cb0ef41Sopenharmony_ci                  "textRaw": "`streamConsumers.json(stream)`",
21491cb0ef41Sopenharmony_ci                  "type": "method",
21501cb0ef41Sopenharmony_ci                  "name": "json",
21511cb0ef41Sopenharmony_ci                  "meta": {
21521cb0ef41Sopenharmony_ci                    "added": [
21531cb0ef41Sopenharmony_ci                      "v16.7.0"
21541cb0ef41Sopenharmony_ci                    ],
21551cb0ef41Sopenharmony_ci                    "changes": []
21561cb0ef41Sopenharmony_ci                  },
21571cb0ef41Sopenharmony_ci                  "signatures": [
21581cb0ef41Sopenharmony_ci                    {
21591cb0ef41Sopenharmony_ci                      "return": {
21601cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {Promise} Fulfills with the contents of the stream parsed as a UTF-8 encoded string that is then passed through `JSON.parse()`.",
21611cb0ef41Sopenharmony_ci                        "name": "return",
21621cb0ef41Sopenharmony_ci                        "type": "Promise",
21631cb0ef41Sopenharmony_ci                        "desc": "Fulfills with the contents of the stream parsed as a UTF-8 encoded string that is then passed through `JSON.parse()`."
21641cb0ef41Sopenharmony_ci                      },
21651cb0ef41Sopenharmony_ci                      "params": [
21661cb0ef41Sopenharmony_ci                        {
21671cb0ef41Sopenharmony_ci                          "textRaw": "`stream` {ReadableStream|stream.Readable|AsyncIterator}",
21681cb0ef41Sopenharmony_ci                          "name": "stream",
21691cb0ef41Sopenharmony_ci                          "type": "ReadableStream|stream.Readable|AsyncIterator"
21701cb0ef41Sopenharmony_ci                        }
21711cb0ef41Sopenharmony_ci                      ]
21721cb0ef41Sopenharmony_ci                    }
21731cb0ef41Sopenharmony_ci                  ],
21741cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { json } from 'node:stream/consumers';\nimport { Readable } from 'node:stream';\n\nconst items = Array.from(\n  {\n    length: 100,\n  },\n  () => ({\n    message: 'hello world from consumers!',\n  }),\n);\n\nconst readable = Readable.from(JSON.stringify(items));\nconst data = await json(readable);\nconsole.log(`from readable: ${data.length}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { json } = require('node:stream/consumers');\nconst { Readable } = require('node:stream');\n\nconst items = Array.from(\n  {\n    length: 100,\n  },\n  () => ({\n    message: 'hello world from consumers!',\n  }),\n);\n\nconst readable = Readable.from(JSON.stringify(items));\njson(readable).then((data) => {\n  console.log(`from readable: ${data.length}`);\n});\n</code></pre>"
21751cb0ef41Sopenharmony_ci                },
21761cb0ef41Sopenharmony_ci                {
21771cb0ef41Sopenharmony_ci                  "textRaw": "`streamConsumers.text(stream)`",
21781cb0ef41Sopenharmony_ci                  "type": "method",
21791cb0ef41Sopenharmony_ci                  "name": "text",
21801cb0ef41Sopenharmony_ci                  "meta": {
21811cb0ef41Sopenharmony_ci                    "added": [
21821cb0ef41Sopenharmony_ci                      "v16.7.0"
21831cb0ef41Sopenharmony_ci                    ],
21841cb0ef41Sopenharmony_ci                    "changes": []
21851cb0ef41Sopenharmony_ci                  },
21861cb0ef41Sopenharmony_ci                  "signatures": [
21871cb0ef41Sopenharmony_ci                    {
21881cb0ef41Sopenharmony_ci                      "return": {
21891cb0ef41Sopenharmony_ci                        "textRaw": "Returns: {Promise} Fulfills with the contents of the stream parsed as a UTF-8 encoded string.",
21901cb0ef41Sopenharmony_ci                        "name": "return",
21911cb0ef41Sopenharmony_ci                        "type": "Promise",
21921cb0ef41Sopenharmony_ci                        "desc": "Fulfills with the contents of the stream parsed as a UTF-8 encoded string."
21931cb0ef41Sopenharmony_ci                      },
21941cb0ef41Sopenharmony_ci                      "params": [
21951cb0ef41Sopenharmony_ci                        {
21961cb0ef41Sopenharmony_ci                          "textRaw": "`stream` {ReadableStream|stream.Readable|AsyncIterator}",
21971cb0ef41Sopenharmony_ci                          "name": "stream",
21981cb0ef41Sopenharmony_ci                          "type": "ReadableStream|stream.Readable|AsyncIterator"
21991cb0ef41Sopenharmony_ci                        }
22001cb0ef41Sopenharmony_ci                      ]
22011cb0ef41Sopenharmony_ci                    }
22021cb0ef41Sopenharmony_ci                  ],
22031cb0ef41Sopenharmony_ci                  "desc": "<pre><code class=\"language-mjs\">import { text } from 'node:stream/consumers';\nimport { Readable } from 'node:stream';\n\nconst readable = Readable.from('Hello world from consumers!');\nconst data = await text(readable);\nconsole.log(`from readable: ${data.length}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { text } = require('node:stream/consumers');\nconst { Readable } = require('node:stream');\n\nconst readable = Readable.from('Hello world from consumers!');\ntext(readable).then((data) => {\n  console.log(`from readable: ${data.length}`);\n});\n</code></pre>"
22041cb0ef41Sopenharmony_ci                }
22051cb0ef41Sopenharmony_ci              ],
22061cb0ef41Sopenharmony_ci              "type": "module",
22071cb0ef41Sopenharmony_ci              "displayName": "Utility Consumers"
22081cb0ef41Sopenharmony_ci            }
22091cb0ef41Sopenharmony_ci          ],
22101cb0ef41Sopenharmony_ci          "type": "module",
22111cb0ef41Sopenharmony_ci          "displayName": "API"
22121cb0ef41Sopenharmony_ci        }
22131cb0ef41Sopenharmony_ci      ],
22141cb0ef41Sopenharmony_ci      "type": "module",
22151cb0ef41Sopenharmony_ci      "displayName": "Web Streams API"
22161cb0ef41Sopenharmony_ci    }
22171cb0ef41Sopenharmony_ci  ]
22181cb0ef41Sopenharmony_ci}