@typescript-package/range
Version:
A lightweight TypeScript library for managing various types of ranges.
32 lines (31 loc) • 1.72 kB
TypeScript
import { Inequality } from './inequality.class';
/**
* The `Number` primitive wrapper object extended by the `Inequality` abstract primitive wrapper `object` represents the number greater or
* less than the given.
*/
export declare class Number<Value extends number> extends Inequality<Value> {
/**
* Creates the `Number` instance with the given primitive `value`.
* @param value The number of generic type variable `Value` to set with a new instance.
* @returns The return value is the `Number` instance of the given primitive `value`.
*/
static create<Value extends number>(value: Value): Number<Value>;
/**
* Checks whether the value of any type is the `Number` instance of any or the given primitive value.
* @param value The value of any type to test against the `Number` instance.
* @param numberValue Optional number of the generic type variable `Value` to check if it's the primitive value of the given `value`.
* @returns The return value is a `boolean` indicating whether the provided value is an instance of `Number` of any or the given
* `numberValue`.
*/
static isNumber<Value extends number>(value: any, numberValue?: Value): value is Number<Value>;
/**
* Creates the `Number` instance of the given primitive `value`.
* @param value The value of the generic type variable `Value` is the primitive value of the new instance.
*/
constructor(value: Value);
/**
* The `valueOf()` method returns the primitive value of the generic type variable `Value` of the specified `Number` object.
* @returns The return value is the primitive value of the generic type variable `Value`.
*/
valueOf(): Value;
}