Converts a parameter value (from URL string or transition param) to a custom/native value.
Converts a parameter value (from URL string or transition param) to a custom/native value.
The URL parameter value to decode.
The name of the parameter in which val
is stored. Can be used for meta-programming of Type
objects.
a custom representation of the URL parameter value.
Encodes a custom/native type value to a string that can be embedded in a URL. Note that the
return value does not need to be URL-safe (i.e. passed through encodeURIComponent()
), it
only needs to be a representation of val
that has been coerced to a string.
Encodes a custom/native type value to a string that can be embedded in a URL. Note that the
return value does not need to be URL-safe (i.e. passed through encodeURIComponent()
), it
only needs to be a representation of val
that has been coerced to a string.
The value to encode.
The name of the parameter in which val
is stored. Can be used for meta-programming of Type
objects.
a string representation of val
that can be encoded in a URL.
Determines whether two decoded values are equivalent.
Determines whether two decoded values are equivalent.
A value to compare against.
A value to compare against.
true
if the values are equivalent/equal, otherwise false
.
Detects whether a value is of a particular type. Accepts a native (decoded) value
and determines whether it matches the current Type
object.
Detects whether a value is of a particular type. Accepts a native (decoded) value
and determines whether it matches the current Type
object.
The value to check.
If the type check is happening in the context of a specific UrlMatcher object,
this is the name of the parameter in which val
is stored. Can be used for
meta-programming of Type
objects.
true
if the value matches the type, otherwise false
.
Generated using TypeDoc
Defines the behavior of a custom Type. See: UrlMatcherFactory.type