valueOf()

Returns the primitive value of the generic type variable `Value` of the specified `Number` object

Number.prototype.valueOf()

The valueOf() method returns the primitive value of the generic type variable Value of the specified Number object.

range.class.ts
String.prototype.valueOf()
number.class.ts
public valueOf(): Value {
  return super.valueOf() as Value;
}

Return type

Returns

The return value is the primitive value of generic type variable Value.

Example usage

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

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

// Returns 390 of type 390.
new Number(id).valueOf();

Last updated