Skip to content

Commit dfb19a4

Browse files
committed
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>
1 parent 54bdc2e commit dfb19a4

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
@@ -7348,6 +7350,8 @@ changes:
73487350
description: No longer experimental.
73497351
-->
73507352
7353+
* Returns: {Promise}
7354+
73517355
Calls `dir.close()` if the directory handle is open, and returns a promise that
73527356
fulfills when disposal is complete.
73537357
@@ -8413,6 +8417,7 @@ of bytes written is passed as the first argument to the event handler.
84138417
* `writeBufferLen` {number}
84148418
* `remainingBufferLen`: {number}
84158419
* `sync`: {boolean} Perform writes synchronously.
8420+
* Returns: {fs.Utf8Stream}
84168421
84178422
#### `utf8Stream.append`
84188423

0 commit comments

Comments
 (0)