doc: clarify fs.ReadStream and fs.WriteStream are not constructable · nodejs/node@6ec9a70 · GitHub
Skip to content

Commit 6ec9a70

Browse files
kovanclaude
authored andcommitted
doc: clarify fs.ReadStream and fs.WriteStream are not constructable
Add explicit wording that fs.ReadStream and fs.WriteStream should not be constructed directly, matching the existing pattern used by fs.Stats ("not to be created directly using the new keyword"). The factory functions fs.createReadStream() and fs.createWriteStream() are the supported API. Fixes: #40546 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> PR-URL: #62208 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1fc86fc commit 6ec9a70

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

doc/api/fs.md

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)