unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
195 lines (194 loc) • 9.2 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a ElectricApparentPower */
export interface ElectricApparentPowerDto {
/** The value of the ElectricApparentPower */
value: number;
/** The specific unit that the ElectricApparentPower value is representing */
unit: ElectricApparentPowerUnits;
}
/** ElectricApparentPowerUnits enumeration */
export declare enum ElectricApparentPowerUnits {
/** */
Voltamperes = "Voltampere",
/** */
Microvoltamperes = "Microvoltampere",
/** */
Millivoltamperes = "Millivoltampere",
/** */
Kilovoltamperes = "Kilovoltampere",
/** */
Megavoltamperes = "Megavoltampere",
/** */
Gigavoltamperes = "Gigavoltampere"
}
/** Power engineers measure apparent power as the magnitude of the vector sum of active and reactive power. It is the product of the root mean square voltage (in volts) and the root mean square current (in amperes). */
export declare class ElectricApparentPower extends BaseUnit {
protected value: number;
private voltamperesLazy;
private microvoltamperesLazy;
private millivoltamperesLazy;
private kilovoltamperesLazy;
private megavoltamperesLazy;
private gigavoltamperesLazy;
/**
* Create a new ElectricApparentPower.
* @param value The value.
* @param fromUnit The ‘ElectricApparentPower’ unit to create from.
* The default unit is Voltamperes
*/
constructor(value: number, fromUnit?: ElectricApparentPowerUnits);
/**
* The base value of ElectricApparentPower is Voltamperes.
* This accessor used when needs a value for calculations and it's better to use directly the base value
*/
get BaseValue(): number;
/** Gets the default unit used when creating instances of the unit or its DTO */
protected get baseUnit(): ElectricApparentPowerUnits.Voltamperes;
/** */
get Voltamperes(): number;
/** */
get Microvoltamperes(): number;
/** */
get Millivoltamperes(): number;
/** */
get Kilovoltamperes(): number;
/** */
get Megavoltamperes(): number;
/** */
get Gigavoltamperes(): number;
/**
* Create a new ElectricApparentPower instance from a Voltamperes
*
* @param value The unit as Voltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromVoltamperes(value: number): ElectricApparentPower;
/**
* Create a new ElectricApparentPower instance from a Microvoltamperes
*
* @param value The unit as Microvoltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromMicrovoltamperes(value: number): ElectricApparentPower;
/**
* Create a new ElectricApparentPower instance from a Millivoltamperes
*
* @param value The unit as Millivoltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromMillivoltamperes(value: number): ElectricApparentPower;
/**
* Create a new ElectricApparentPower instance from a Kilovoltamperes
*
* @param value The unit as Kilovoltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromKilovoltamperes(value: number): ElectricApparentPower;
/**
* Create a new ElectricApparentPower instance from a Megavoltamperes
*
* @param value The unit as Megavoltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromMegavoltamperes(value: number): ElectricApparentPower;
/**
* Create a new ElectricApparentPower instance from a Gigavoltamperes
*
* @param value The unit as Gigavoltamperes to create a new ElectricApparentPower from.
* @returns The new ElectricApparentPower instance.
*/
static FromGigavoltamperes(value: number): ElectricApparentPower;
/**
* Gets the base unit enumeration associated with ElectricApparentPower
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof ElectricApparentPowerUnits;
/**
* Gets the default unit used when creating instances of the unit or its DTO
* @returns The unit enumeration value used as a default parameter in constructor and DTO methods
*/
protected static getBaseUnit(): ElectricApparentPowerUnits.Voltamperes;
/**
* Create API DTO represent a ElectricApparentPower unit.
* @param holdInUnit The specific ElectricApparentPower unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: ElectricApparentPowerUnits): ElectricApparentPowerDto;
/**
* Create a ElectricApparentPower unit from an API DTO representation.
* @param dtoElectricApparentPower The ElectricApparentPower API DTO representation
*/
static FromDto(dtoElectricApparentPower: ElectricApparentPowerDto): ElectricApparentPower;
/**
* Convert ElectricApparentPower to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: ElectricApparentPowerUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the ElectricApparentPower to string.
* Note! the default format for ElectricApparentPower is Voltamperes.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the ElectricApparentPower.
* @param options The ToString options, it also can be the number of fractional digits to keep that deprecated and moved to the options object. support in number will be dropped in the upcoming versions.
* @returns The string format of the ElectricApparentPower.
*/
toString(unit?: ElectricApparentPowerUnits, options?: number | ToStringOptions): string;
/**
* Get ElectricApparentPower unit abbreviation.
* Note! the default abbreviation for ElectricApparentPower is Voltamperes.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the ElectricApparentPower.
* @returns The abbreviation string of ElectricApparentPower.
*/
getUnitAbbreviation(unitAbbreviation?: ElectricApparentPowerUnits): string;
/**
* Check if the given ElectricApparentPower are equals to the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns True if the given ElectricApparentPower are equal to the current ElectricApparentPower.
*/
equals(electricApparentPower: ElectricApparentPower): boolean;
/**
* Compare the given ElectricApparentPower against the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns 0 if they are equal, -1 if the current ElectricApparentPower is less then other, 1 if the current ElectricApparentPower is greater then other.
*/
compareTo(electricApparentPower: ElectricApparentPower): number;
/**
* Add the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
add(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
/**
* Subtract the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
subtract(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
/**
* Multiply the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
multiply(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
/**
* Divide the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
divide(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
/**
* Modulo the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
modulo(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
/**
* Pow the given ElectricApparentPower with the current ElectricApparentPower.
* @param electricApparentPower The other ElectricApparentPower.
* @returns A new ElectricApparentPower instance with the results.
*/
pow(electricApparentPower: ElectricApparentPower): ElectricApparentPower;
}