Commit a00f76c3 authored by Rich Trott's avatar Rich Trott
Browse files

doc: synchronize argument names for appendFile()

The documentation used `file` for the first argument to `appendFile()`
functions. However, the code and (more importantly) thrown errors
referred to it as `path`. The latter is especially important because
context is not provided. So you're looking for a function that takes
`path` but that string doesn't appear in your code *or* in the
documentation. It's not until the end user looks at the source code of
Node.js that they can figure out what's going on. This is why it is
important that the names of variables in the documentation match that in
the code. If we want to change this to `file`, then that's OK, but we
need to do it in the source code and error messages too, not just in the
docs. Changing the docs is the smallest change to synchronize everything
so that's what this change does.

PR-URL: https://github.com/nodejs/node/pull/20489


Reviewed-By: default avatarVse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: default avatarTrivikram Kamat <trivikr.dev@gmail.com>
parent 6a24c0c4
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment