static isMinimum()
Checks whether the value of any type is the Maximum instance of any or the given primitive value
Minimum.isMinimum()
Minimum.isMinimum()The static isMinimum() method checks the provided value of any type whether is an instance of Minimum of any or the given min.
public static isMinimum<Value extends number>(
value: any,
min?: Value
): value is Minimum<Value> {
return (
typeof value === 'object' &&
value instanceof this &&
(typeof min === 'number' ? value.valueOf() : true)
);
}Generic type variables
A generic type variable indicates captured type of the supplied min via the return type.
Parameters
The value of any type to test against the Minimum instance.
Optional minimum of the generic type variable Value to check if it's the primitive value of the given value.
Return type
The return type is a boolean resulting from its statement indicating the value is the Minimum object that takes the generic type variable Value.
Returns
The return value is a boolean indicating whether the provided value is an instance of Minimum of any or the given min.
Example usage
// Example usage.
import { Minimum } from '@angular-package/range';
Last updated