static define()
Defines the `RangeError` instance.
RangeError.define()
RangeError.define()
Defines the RangeError
instance with the message built from the given required problem
, fix
and optional id
, max
, min
on the given or stored template
.
Generic type variables
A generic type variable constrained by the string
, by default of the value captured from the provided optional id
indicates the identification type of a new RangeError
instance.
A generic type variable constrained by the number
and undefined
, by default of the value equal to undefined
indicates the captured type of the supplied min
via the return type.
A generic type variable constrained by the number
and undefined
, by default of the value equal to undefined
indicates the captured type of the supplied max
via the return type.
Parameters
Description of the problem of a string
type.
A solution to the given problem
of a string
type.
Optional unique identification to the given problem
of generic type variable Id
.
min?:
Min
min?:
Min
The optional minimum range of generic type variable Min
that causes an error to be thrown(or not thrown).
max?:
Max
max?:
Max
The optional maximum range of generic type variable Max
that causes an error to be thrown(or not thrown).
template =
RangeError
.template
template =
RangeError
.template
A template of error message with the replaceable {problem}
, {fix}
and optional {id}
, {max}
, {min}
tags. By default, the value is equal to the static property RangeError.template
.
Return type
The return type is the RangeError
object that takes generic type variable Id
as identification, Min
as minimum range and Max
as maximum range.
Returns
The return value is a new instance of the RangeError
with the message built from the given required problem
, fix
and optional id
, min
, max
on the given or stored template
.
Example usage
Last updated