* Strict mode error constructor * * @param {string} type * @param {string} value * @api private
(path, val)
| 16 | * @api private |
| 17 | */ |
| 18 | constructor(path, val) { |
| 19 | const typeDescription = Array.isArray(val) ? 'array' : 'primitive value'; |
| 20 | super('Tried to set nested object field `' + path + |
| 21 | `\` to ${typeDescription} \`` + val + '`'); |
| 22 | this.path = path; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | Object.defineProperty(ObjectExpectedError.prototype, 'name', { |
nothing calls this directly
no outgoing calls
no test coverage detected