diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/stream.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 3d701b1b0b..341b7c12e3 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2419,7 +2419,7 @@ const fs = require('fs'); async function run() { await pipeline( fs.createReadStream('lowercase.txt'), - async function* (source, signal) { + async function* (source, { signal }) { source.setEncoding('utf8'); // Work with strings rather than `Buffer`s. for await (const chunk of source) { yield await processChunk(chunk, { signal }); @@ -2443,7 +2443,7 @@ const fs = require('fs'); async function run() { await pipeline( - async function * (signal) { + async function* ({ signal }) { await someLongRunningfn({ signal }); yield 'asd'; }, |