Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: add FileHandle to doc/type-parser.js #18601

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3548,7 +3548,7 @@ the error raised if the file is not accessible.
added: REPLACEME
-->

* `file` {string|Buffer|URL|[FileHandle][]} filename or `FileHandle`
* `file` {string|Buffer|URL|FileHandle} filename or `FileHandle`
* `data` {string|Buffer}
* `options` {Object|string}
* `encoding` {string|null} **Default:** `'utf8'`
Expand Down Expand Up @@ -3640,7 +3640,7 @@ fs.promises.copyFile('source.txt', 'destination.txt', COPYFILE_EXCL)
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `mode` {integer}
* Returns: {Promise}

Expand All @@ -3652,7 +3652,7 @@ success.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `uid` {integer}
* `gid` {integer}
* Returns: {Promise}
Expand All @@ -3665,7 +3665,7 @@ the `Promise` with no arguments upon success.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* Returns: {Promise}

Asynchronous fdatasync(2). The `Promise` is resolved with no arguments upon
Expand All @@ -3676,7 +3676,7 @@ success.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* Returns: {Promise}

Retrieves the [`fs.Stats`][] for the given `filehandle`.
Expand All @@ -3686,7 +3686,7 @@ Retrieves the [`fs.Stats`][] for the given `filehandle`.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* Returns: {Promise}

Asynchronous fsync(2). The `Promise` is resolved with no arguments upon
Expand All @@ -3697,7 +3697,7 @@ success.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `len` {integer} **Default:** `0`
* Returns: {Promise}

Expand Down Expand Up @@ -3746,7 +3746,7 @@ The last three bytes are null bytes ('\0'), to compensate the over-truncation.
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `atime` {number|string|Date}
* `mtime` {number|string|Date}`
* Returns: {Promise}
Expand Down Expand Up @@ -3934,7 +3934,7 @@ files can be opened for writing with the `r+` flag. A call to
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `buffer` {Buffer|Uint8Array}
* `offset` {integer}
* `length` {integer}
Expand Down Expand Up @@ -3981,7 +3981,7 @@ will be passed as `Buffer` objects.
added: REPLACEME
-->

* `path` {string|Buffer|URL|[FileHandle][]} filename or `FileHandle`
* `path` {string|Buffer|URL|FileHandle} filename or `FileHandle`
* `options` {Object|string}
* `encoding` {string|null} **Default:** `null`
* `flag` {string} **Default:** `'r'`
Expand Down Expand Up @@ -4147,7 +4147,7 @@ The `atime` and `mtime` arguments follow these rules:
added: REPLACEME
-->

* `filehandle` {[FileHandle][]}
* `filehandle` {FileHandle}
* `buffer` {Buffer|Uint8Array}
* `offset` {integer}
* `length` {integer}
Expand Down Expand Up @@ -4180,7 +4180,7 @@ the end of the file.
added: REPLACEME
-->

* `file` {string|Buffer|URL|[FileHandle][]} filename or `FileHandle`
* `file` {string|Buffer|URL|FileHandle} filename or `FileHandle`
* `data` {string|Buffer|Uint8Array}
* `options` {Object|string}
* `encoding` {string|null} **Default:** `'utf8'`
Expand Down Expand Up @@ -4469,7 +4469,6 @@ The following constants are meant for use with the [`fs.Stats`][] object's
[`util.promisify()`]: util.html#util_util_promisify_original
[Caveats]: #fs_caveats
[Common System Errors]: errors.html#errors_common_system_errors
[FileHandle]: #fs_class_filehandle
[FS Constants]: #fs_fs_constants_1
[MDN-Date]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date
[MDN-Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type
Expand Down
1 change: 1 addition & 0 deletions tools/doc/type-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const typeMap = {

'EventEmitter': 'events.html#events_class_eventemitter',

'FileHandle': 'fs.html#fs_class_filehandle',
'fs.Stats': 'fs.html#fs_class_fs_stats',

'http.Agent': 'http.html#http_class_http_agent',
Expand Down