Validates the state of a set.
The returned validator throws an exception immediately if a validation fails. This exception is then converted into an AssertionError. Exceptions unrelated to validation failures are not converted.
the type the value
the type elements in the set
the value
Optional
the name of the value
validator for the value
TypeError if name is undefined or null
name
undefined
null
RangeError if name is empty
Validates the state of a set.
The returned validator throws an exception immediately if a validation fails. This exception is then converted into an AssertionError. Exceptions unrelated to validation failures are not converted.