UNPKG

unitsnet-js

Version:

A better way to hold unit variables and easily convert to the destination unit

315 lines (314 loc) 12.7 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a ElectricConductance */ export interface ElectricConductanceDto { /** The value of the ElectricConductance */ value: number; /** The specific unit that the ElectricConductance value is representing */ unit: ElectricConductanceUnits; } /** ElectricConductanceUnits enumeration */ export declare enum ElectricConductanceUnits { /** */ Siemens = "Siemens", /** */ Mhos = "Mho", /** */ Nanosiemens = "Nanosiemens", /** */ Microsiemens = "Microsiemens", /** */ Millisiemens = "Millisiemens", /** */ Kilosiemens = "Kilosiemens", /** */ Megasiemens = "Megasiemens", /** */ Gigasiemens = "Gigasiemens", /** */ Terasiemens = "Terasiemens", /** */ Nanomhos = "Nanomho", /** */ Micromhos = "Micromho", /** */ Millimhos = "Millimho", /** */ Kilomhos = "Kilomho", /** */ Megamhos = "Megamho", /** */ Gigamhos = "Gigamho", /** */ Teramhos = "Teramho" } /** The electrical conductance of an object is a measure of the ease with which an electric current passes. Along with susceptance, it is one of two elements of admittance. Its reciprocal quantity is electrical resistance. */ export declare class ElectricConductance extends BaseUnit { protected value: number; private siemensLazy; private mhosLazy; private nanosiemensLazy; private microsiemensLazy; private millisiemensLazy; private kilosiemensLazy; private megasiemensLazy; private gigasiemensLazy; private terasiemensLazy; private nanomhosLazy; private micromhosLazy; private millimhosLazy; private kilomhosLazy; private megamhosLazy; private gigamhosLazy; private teramhosLazy; /** * Create a new ElectricConductance. * @param value The value. * @param fromUnit The ‘ElectricConductance’ unit to create from. * The default unit is Siemens */ constructor(value: number, fromUnit?: ElectricConductanceUnits); /** * The base value of ElectricConductance is Siemens. * 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(): ElectricConductanceUnits.Siemens; /** */ get Siemens(): number; /** */ get Mhos(): number; /** */ get Nanosiemens(): number; /** */ get Microsiemens(): number; /** */ get Millisiemens(): number; /** */ get Kilosiemens(): number; /** */ get Megasiemens(): number; /** */ get Gigasiemens(): number; /** */ get Terasiemens(): number; /** */ get Nanomhos(): number; /** */ get Micromhos(): number; /** */ get Millimhos(): number; /** */ get Kilomhos(): number; /** */ get Megamhos(): number; /** */ get Gigamhos(): number; /** */ get Teramhos(): number; /** * Create a new ElectricConductance instance from a Siemens * * @param value The unit as Siemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromSiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Mhos * * @param value The unit as Mhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Nanosiemens * * @param value The unit as Nanosiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromNanosiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Microsiemens * * @param value The unit as Microsiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMicrosiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Millisiemens * * @param value The unit as Millisiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMillisiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Kilosiemens * * @param value The unit as Kilosiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromKilosiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Megasiemens * * @param value The unit as Megasiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMegasiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Gigasiemens * * @param value The unit as Gigasiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromGigasiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Terasiemens * * @param value The unit as Terasiemens to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromTerasiemens(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Nanomhos * * @param value The unit as Nanomhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromNanomhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Micromhos * * @param value The unit as Micromhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMicromhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Millimhos * * @param value The unit as Millimhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMillimhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Kilomhos * * @param value The unit as Kilomhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromKilomhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Megamhos * * @param value The unit as Megamhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromMegamhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Gigamhos * * @param value The unit as Gigamhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromGigamhos(value: number): ElectricConductance; /** * Create a new ElectricConductance instance from a Teramhos * * @param value The unit as Teramhos to create a new ElectricConductance from. * @returns The new ElectricConductance instance. */ static FromTeramhos(value: number): ElectricConductance; /** * Gets the base unit enumeration associated with ElectricConductance * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ElectricConductanceUnits; /** * 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(): ElectricConductanceUnits.Siemens; /** * Create API DTO represent a ElectricConductance unit. * @param holdInUnit The specific ElectricConductance unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ElectricConductanceUnits): ElectricConductanceDto; /** * Create a ElectricConductance unit from an API DTO representation. * @param dtoElectricConductance The ElectricConductance API DTO representation */ static FromDto(dtoElectricConductance: ElectricConductanceDto): ElectricConductance; /** * Convert ElectricConductance to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ElectricConductanceUnits): number; private convertFromBase; private convertToBase; /** * Format the ElectricConductance to string. * Note! the default format for ElectricConductance is Siemens. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ElectricConductance. * @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 ElectricConductance. */ toString(unit?: ElectricConductanceUnits, options?: number | ToStringOptions): string; /** * Get ElectricConductance unit abbreviation. * Note! the default abbreviation for ElectricConductance is Siemens. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ElectricConductance. * @returns The abbreviation string of ElectricConductance. */ getUnitAbbreviation(unitAbbreviation?: ElectricConductanceUnits): string; /** * Check if the given ElectricConductance are equals to the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns True if the given ElectricConductance are equal to the current ElectricConductance. */ equals(electricConductance: ElectricConductance): boolean; /** * Compare the given ElectricConductance against the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns 0 if they are equal, -1 if the current ElectricConductance is less then other, 1 if the current ElectricConductance is greater then other. */ compareTo(electricConductance: ElectricConductance): number; /** * Add the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ add(electricConductance: ElectricConductance): ElectricConductance; /** * Subtract the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ subtract(electricConductance: ElectricConductance): ElectricConductance; /** * Multiply the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ multiply(electricConductance: ElectricConductance): ElectricConductance; /** * Divide the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ divide(electricConductance: ElectricConductance): ElectricConductance; /** * Modulo the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ modulo(electricConductance: ElectricConductance): ElectricConductance; /** * Pow the given ElectricConductance with the current ElectricConductance. * @param electricConductance The other ElectricConductance. * @returns A new ElectricConductance instance with the results. */ pow(electricConductance: ElectricConductance): ElectricConductance; }