Skip to content

Commit 205ef76

Browse files
authored
doc: add missing return types in fs.md
Three entries in the fs documentation described their return value only in prose, or not at all, so doc-kit could not parse a return type and fell back to `void`: * `filehandle[Symbol.asyncDispose]()` and `dir[Symbol.asyncDispose]()` both return a promise, matching the existing `Returns: {Promise}` annotations on other async dispose methods. * `new fs.Utf8Stream([options])` is a constructor and returns an instance of the class. Verified at runtime and by rendering the page locally with doc-kit. Refs: nodejs/doc-kit#953 Signed-off-by: Chxxeton <43923165+Chxxeton@users.noreply.github.com> PR-URL: #65307 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
1 parent ba8cdc2 commit 205ef76

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎doc/api/fs.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,8 @@ changes:
11911191
description: No longer experimental.
11921192
-->
11931193
1194+
* Returns: {Promise}
1195+
11941196
Calls `filehandle.close()` and returns a promise that fulfills when the
11951197
filehandle is closed.
11961198
@@ -7351,6 +7353,8 @@ changes:
73517353
description: No longer experimental.
73527354
-->
73537355
7356+
* Returns: {Promise}
7357+
73547358
Calls `dir.close()` if the directory handle is open, and returns a promise that
73557359
fulfills when disposal is complete.
73567360
@@ -8416,6 +8420,7 @@ of bytes written is passed as the first argument to the event handler.
84168420
* `writeBufferLen` {number}
84178421
* `remainingBufferLen`: {number}
84188422
* `sync`: {boolean} Perform writes synchronously.
8423+
* Returns: {fs.Utf8Stream}
84198424
84208425
#### `utf8Stream.append`
84218426

0 commit comments

Comments
 (0)