Skip to content

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

Description

@starkwang

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

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions