lib: inconsistent initial of expected
in TypeError[ERR_INVALID_ARG_TYPE]
#16383
Labels
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
The initials of
expected
in TypeError[ERR_INVALID_ARG_TYPE] are inconsistent. Some codes are using uppercase for primitive types and some are using lowercase:For example, uppercase:
https://github.com/nodejs/node/blob/master/lib/_tls_common.js#L61
https://github.com/nodejs/node/blob/master/lib/internal/child_process.js#L295
Lowercase :
https://github.com/nodejs/node/blob/master/lib/buffer.js#L201
https://github.com/nodejs/node/blob/master/lib/fs.js#L1865
It‘s a little bit of chaos. Should we unify them?
The text was updated successfully, but these errors were encountered: