Constructors
constructor
- new UnitValue<U, T>(value?, unit?): UnitValue<U, T>
Parameters
Optional
value: TOptional
unit: U
Accessors
unit
- get unit(): U
Returns U
Unit this value is in
Methods
clone
- clone(): this
Returns this
setValue
- setValue(value): this
Returns this
to
- to<T>(unit): this
Returns this
Converted value
toString
- toString(): string
Returns string
Unit value as string
valueOf
- valueOf(): T
Returns T
Primitive value
Unit value
Usage
Creation
Conversion