Class: TypeValidationError

TypeValidationError(argumentName, providedValue, expectedType, optionsopt)

Type validation error

Constructor

new TypeValidationError(argumentName, providedValue, expectedType, optionsopt)

Parameters:
Name Type Attributes Description
argumentName string Name of the argument
providedValue any The value that was provided
expectedType string The expected type
options object <optional>
Additional options
Source:

Extends

Methods

toJSON() → {object}

Returns a detailed error object for logging/serialization
Overrides:
Source:
Returns:
Structured error information
Type
object

toString() → {string}

Returns a user-friendly error description
Overrides:
Source:
Returns:
Formatted error string
Type
string