Overview
The `RangeError` object
Last updated
The `RangeError` object
Last updated
RangeError {}
The RangeError
object is an extension of the CommonError
class and is thrown when a value is not in the set or range of allowed values with the message built from the described problem and its solution, optional explicit identification and minimum/maximum range on the given or stored template.
public get [Symbol.toStringTag](): string
The get
accessor, with the help of toStringTag
, changes the default tag to 'RangeError'
for an instance of RangeError
.
#max?: Max
Private property of the maximum range of generic type variable Max
that causes an error to be thrown(or not thrown).
#min?: Min
Private property of the minimum range of generic type variable Min
that causes an error to be thrown(or not thrown).
public static isRangeError(): value is RangeError<Id, Min, Max>
Checks whether the value
of any
type is an instance of RangeError
of any or the given minimum/maximum range and identification.