typescript-dotnet-core
Version:
A the core classes and utilities of a JavaScript-Friendly .NET Based TypeScript Library.
21 lines (20 loc) • 795 B
TypeScript
/*!
* @author electricessence / https://github.com/electricessence/
* Licensing: MIT https://github.com/electricessence/TypeScript.NET-Core/blob/master/LICENSE.md
*/
import TimeUnit from "./TimeUnit";
import TimeQuantity from "./TimeQuantity";
import ITimeQuantity from "./ITimeQuantity";
/**
* TimeUnitValue allows for passing around a reference to a changeable measure of time coerced by its unit type.
*/
export default class TimeUnitValue extends TimeQuantity {
private _units;
constructor(value: number | ITimeQuantity, _units: TimeUnit);
get value(): number;
set value(v: number);
getTotalMilliseconds(): number;
get units(): TimeUnit;
to(units?: TimeUnit): TimeUnitValue;
static from(value: number | ITimeQuantity, units?: TimeUnit): TimeUnitValue;
}