★ Constructor

The `Number` primitive wrapper constructor

Number()

Creates the Number instance of the given primitive value.

number.class.ts
constructor(value: Value) {
  super(value);
}

Parameters

value:Value

The value of the generic type variable Value is the primitive value of the new instance.

Example usage

// Example usage.
import { Number } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Number {390} of Number<390>.
new Number(id);

Last updated