Skip to content

doc: add null to fs.read position type - #65191

Closed
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-fs-read-position-null
Closed

doc: add null to fs.read position type#65191
arhxam wants to merge 1 commit into
nodejs:mainfrom
arhxam:doc-fs-read-position-null

Conversation

@arhxam

@arhxam arhxam commented Aug 10, 2026

Copy link
Copy Markdown

Description

The fs.read(fd, buffer[, options], callback) overload documents
options.position as {integer|bigint} while also giving it a default of
null. The adjacent fs.read(fd[, options], callback) overload correctly
includes null in the accepted type, and the implementation uses null to
read from the current file position.

This adds null to the documented type for the buffer/options overload so its
type and default agree. Documentation-only change.

The buffer/options overload gives position a default of null but
omitted null from its type. The adjacent options-only overload includes
it, and the implementation accepts it to read from the current file
position. Make the type and default agree.

Signed-off-by: Arham Wani <arhamwani765@gmail.com>
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Aug 10, 2026
@aduh95 aduh95 closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants