Skip to content

lib: inconsistent initial of expected in TypeError[ERR_INVALID_ARG_TYPE] #16383

Closed
@starkwang

Description

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?

  • Version: master
  • Platform: all
  • Subsystem: internal/errors, lib

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originated in Node.js core.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions