* Creates a TypeError with a Node.js error code. * @param {string} message Error message. * @param {string} code Node.js error code to assign. * @returns {TypeError}
(message, code)
| 87 | * @returns {TypeError} |
| 88 | */ |
| 89 | function codedTypeError(message, code) { |
| 90 | // eslint-disable-next-line no-restricted-syntax |
| 91 | const err = new TypeError(message); |
| 92 | setOwnProperty(err, 'code', code); |
| 93 | return err; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Creates the exception thrown by Web IDL converters. |
no test coverage detected
searching dependent graphs…