static isMaximum()
Checks whether the value of any type is the Maximum instance of any or the given primitive value
Maximum.isMaximum()
public static isMaximum<Value extends number>(
value: any,
max?: Value
): value is Maximum<Value> {
return (
typeof value === 'object' &&
value instanceof this &&
(typeof max === 'number' ? value.valueOf() === max : true)
);
}Generic type variables
Valueextendsnumber
Parameters
value:any
max?:Value
Return type
value is Maximum<Value>
Returns
Example usage
Last updated