UNPKG

dxt-quantity-types

Version:

quantity

34 lines (33 loc) 1.35 kB
import { IQuantity } from "../types/quantity"; export declare class Quantity implements IQuantity { originalUomQuantity?: number; path: string[]; isEmpty: boolean; values: { [index: string]: number | undefined; }; factor: number; startDate: Date; endDate: Date; extraHour: boolean; allvalues: { [index: string]: Quantity; }; constructor(data: IQuantity); getValueFor(uom: string): number | undefined; setValueFor(uom: string, val: number | undefined): void; sumValues(val: IQuantity): void; sumValuesWithFactor(val: IQuantity, factor: number): Quantity; addQuantity(val: IQuantity, key: string): void; copyQuantity(val: IQuantity, key: string): void; addAllQuantities(val: IQuantity): void; copyAllQuantities(val: IQuantity): void; applyValues(val: IQuantity): void; static getValueOf(obj: IQuantity, uom: string): number | undefined; static createForExport(uom: string, value: number | undefined): Quantity; static createNew(): Quantity; static createEmpty(): Quantity; static sum(a: number | undefined, b: number | undefined): number | undefined; static compare(valueA: Quantity, valueB: Quantity): boolean; static greaterThan(valueA: IQuantity, valueB: IQuantity, uom: string): boolean; }