unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
219 lines (218 loc) • 9.13 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a ElectricImpedance */
export interface ElectricImpedanceDto {
/** The value of the ElectricImpedance */
value: number;
/** The specific unit that the ElectricImpedance value is representing */
unit: ElectricImpedanceUnits;
}
/** ElectricImpedanceUnits enumeration */
export declare enum ElectricImpedanceUnits {
/** */
Ohms = "Ohm",
/** */
Nanoohms = "Nanoohm",
/** */
Microohms = "Microohm",
/** */
Milliohms = "Milliohm",
/** */
Kiloohms = "Kiloohm",
/** */
Megaohms = "Megaohm",
/** */
Gigaohms = "Gigaohm",
/** */
Teraohms = "Teraohm"
}
/** Electric impedance is the opposition to alternating current presented by the combined effect of resistance and reactance in a circuit. It is defined as the inverse of admittance. The SI unit of impedance is the ohm (symbol Ω). */
export declare class ElectricImpedance extends BaseUnit {
protected value: number;
private ohmsLazy;
private nanoohmsLazy;
private microohmsLazy;
private milliohmsLazy;
private kiloohmsLazy;
private megaohmsLazy;
private gigaohmsLazy;
private teraohmsLazy;
/**
* Create a new ElectricImpedance.
* @param value The value.
* @param fromUnit The ‘ElectricImpedance’ unit to create from.
* The default unit is Ohms
*/
constructor(value: number, fromUnit?: ElectricImpedanceUnits);
/**
* The base value of ElectricImpedance is Ohms.
* 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(): ElectricImpedanceUnits.Ohms;
/** */
get Ohms(): number;
/** */
get Nanoohms(): number;
/** */
get Microohms(): number;
/** */
get Milliohms(): number;
/** */
get Kiloohms(): number;
/** */
get Megaohms(): number;
/** */
get Gigaohms(): number;
/** */
get Teraohms(): number;
/**
* Create a new ElectricImpedance instance from a Ohms
*
* @param value The unit as Ohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromOhms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Nanoohms
*
* @param value The unit as Nanoohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromNanoohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Microohms
*
* @param value The unit as Microohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromMicroohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Milliohms
*
* @param value The unit as Milliohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromMilliohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Kiloohms
*
* @param value The unit as Kiloohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromKiloohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Megaohms
*
* @param value The unit as Megaohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromMegaohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Gigaohms
*
* @param value The unit as Gigaohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromGigaohms(value: number): ElectricImpedance;
/**
* Create a new ElectricImpedance instance from a Teraohms
*
* @param value The unit as Teraohms to create a new ElectricImpedance from.
* @returns The new ElectricImpedance instance.
*/
static FromTeraohms(value: number): ElectricImpedance;
/**
* Gets the base unit enumeration associated with ElectricImpedance
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof ElectricImpedanceUnits;
/**
* 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(): ElectricImpedanceUnits.Ohms;
/**
* Create API DTO represent a ElectricImpedance unit.
* @param holdInUnit The specific ElectricImpedance unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: ElectricImpedanceUnits): ElectricImpedanceDto;
/**
* Create a ElectricImpedance unit from an API DTO representation.
* @param dtoElectricImpedance The ElectricImpedance API DTO representation
*/
static FromDto(dtoElectricImpedance: ElectricImpedanceDto): ElectricImpedance;
/**
* Convert ElectricImpedance to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: ElectricImpedanceUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the ElectricImpedance to string.
* Note! the default format for ElectricImpedance is Ohms.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the ElectricImpedance.
* @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 ElectricImpedance.
*/
toString(unit?: ElectricImpedanceUnits, options?: number | ToStringOptions): string;
/**
* Get ElectricImpedance unit abbreviation.
* Note! the default abbreviation for ElectricImpedance is Ohms.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the ElectricImpedance.
* @returns The abbreviation string of ElectricImpedance.
*/
getUnitAbbreviation(unitAbbreviation?: ElectricImpedanceUnits): string;
/**
* Check if the given ElectricImpedance are equals to the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns True if the given ElectricImpedance are equal to the current ElectricImpedance.
*/
equals(electricImpedance: ElectricImpedance): boolean;
/**
* Compare the given ElectricImpedance against the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns 0 if they are equal, -1 if the current ElectricImpedance is less then other, 1 if the current ElectricImpedance is greater then other.
*/
compareTo(electricImpedance: ElectricImpedance): number;
/**
* Add the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
add(electricImpedance: ElectricImpedance): ElectricImpedance;
/**
* Subtract the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
subtract(electricImpedance: ElectricImpedance): ElectricImpedance;
/**
* Multiply the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
multiply(electricImpedance: ElectricImpedance): ElectricImpedance;
/**
* Divide the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
divide(electricImpedance: ElectricImpedance): ElectricImpedance;
/**
* Modulo the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
modulo(electricImpedance: ElectricImpedance): ElectricImpedance;
/**
* Pow the given ElectricImpedance with the current ElectricImpedance.
* @param electricImpedance The other ElectricImpedance.
* @returns A new ElectricImpedance instance with the results.
*/
pow(electricImpedance: ElectricImpedance): ElectricImpedance;
}