Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1x 1x 1x | class InvalidTypeError extends Error {
/**
* An error to be raised when a property has an invalid type.
*
* @param {string} name The name of the property.
* @param {any} value The invalid value.
* @param {string} typeName The name of the valid type.
*/
constructor(name, value, typeName) {
const msg = `type of ${name} "${typeof value}" is not a valid type. Should be of type ${typeName}.`;
super(msg);
}
}
module.exports = { InvalidTypeError };
|