We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4eaaa8d commit 5df3efeCopy full SHA for 5df3efe
lib/errors.js
@@ -105,3 +105,11 @@ E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file')
105
E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self')
106
E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type')
107
E('ERR_FS_EISDIR', 'Path is a directory')
108
+
109
+module.exports.ERR_INVALID_ARG_TYPE = class ERR_INVALID_ARG_TYPE extends Error {
110
+ constructor(name, expected, actual) {
111
+ super()
112
+ this.code = 'ERR_INVALID_ARG_TYPE'
113
+ this.message = `The ${name} argument must be ${expected}. Received ${typeof actual}`
114
+ }
115
+}
0 commit comments