static isLess()
Checks whether the given value is the Less instance of any or given primitive value
Less.isLess()
Checks whether the given value is the Less instance of any or given primitive value.
public static isLess<Value extends number>(
value: any,
lessValue?: Value
): value is Less<Value> {
return (
typeof value === 'object' &&
value instanceof this &&
(typeof lessValue === 'number' ? value.valueOf() === lessValue : true)
);
}Generic type variables
Valueextendsnumber
A generic type variable indicates captured type of the supplied lessValue via the return type.
Parameters
value:any
The value of any type to test against the Less instance.
lessValue:Value
An optional value of generic type variable Value to check whether it's the primitive value of the given value.
Return type
Lees<Value>
The return type is a boolean resulting from its statement indicating the value is the Less object that takes the generic type variable Value.
Returns
The return value is a boolean indicating whether the given value is the Less instance of any or given primitive value.
Example usage
Last updated