UNPKG

unitsnet-js

Version:

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

315 lines (314 loc) 12.6 kB
import { BaseUnit, ToStringOptions } from "../base-unit"; /** API DTO represents a ElectricAdmittance */ export interface ElectricAdmittanceDto { /** The value of the ElectricAdmittance */ value: number; /** The specific unit that the ElectricAdmittance value is representing */ unit: ElectricAdmittanceUnits; } /** ElectricAdmittanceUnits enumeration */ export declare enum ElectricAdmittanceUnits { /** */ 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" } /** Electric admittance is a measure of how easily a circuit or device will allow a current to flow by the combined effect of conductance and susceptance in a circuit. It is defined as the inverse of impedance. The SI unit of admittance is the siemens (symbol S). */ export declare class ElectricAdmittance 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 ElectricAdmittance. * @param value The value. * @param fromUnit The ‘ElectricAdmittance’ unit to create from. * The default unit is Siemens */ constructor(value: number, fromUnit?: ElectricAdmittanceUnits); /** * The base value of ElectricAdmittance 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(): ElectricAdmittanceUnits.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 ElectricAdmittance instance from a Siemens * * @param value The unit as Siemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromSiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Mhos * * @param value The unit as Mhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Nanosiemens * * @param value The unit as Nanosiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromNanosiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Microsiemens * * @param value The unit as Microsiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMicrosiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Millisiemens * * @param value The unit as Millisiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMillisiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Kilosiemens * * @param value The unit as Kilosiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromKilosiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Megasiemens * * @param value The unit as Megasiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMegasiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Gigasiemens * * @param value The unit as Gigasiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromGigasiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Terasiemens * * @param value The unit as Terasiemens to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromTerasiemens(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Nanomhos * * @param value The unit as Nanomhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromNanomhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Micromhos * * @param value The unit as Micromhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMicromhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Millimhos * * @param value The unit as Millimhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMillimhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Kilomhos * * @param value The unit as Kilomhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromKilomhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Megamhos * * @param value The unit as Megamhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromMegamhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Gigamhos * * @param value The unit as Gigamhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromGigamhos(value: number): ElectricAdmittance; /** * Create a new ElectricAdmittance instance from a Teramhos * * @param value The unit as Teramhos to create a new ElectricAdmittance from. * @returns The new ElectricAdmittance instance. */ static FromTeramhos(value: number): ElectricAdmittance; /** * Gets the base unit enumeration associated with ElectricAdmittance * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ElectricAdmittanceUnits; /** * 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(): ElectricAdmittanceUnits.Siemens; /** * Create API DTO represent a ElectricAdmittance unit. * @param holdInUnit The specific ElectricAdmittance unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ElectricAdmittanceUnits): ElectricAdmittanceDto; /** * Create a ElectricAdmittance unit from an API DTO representation. * @param dtoElectricAdmittance The ElectricAdmittance API DTO representation */ static FromDto(dtoElectricAdmittance: ElectricAdmittanceDto): ElectricAdmittance; /** * Convert ElectricAdmittance to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ElectricAdmittanceUnits): number; private convertFromBase; private convertToBase; /** * Format the ElectricAdmittance to string. * Note! the default format for ElectricAdmittance is Siemens. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ElectricAdmittance. * @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 ElectricAdmittance. */ toString(unit?: ElectricAdmittanceUnits, options?: number | ToStringOptions): string; /** * Get ElectricAdmittance unit abbreviation. * Note! the default abbreviation for ElectricAdmittance is Siemens. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ElectricAdmittance. * @returns The abbreviation string of ElectricAdmittance. */ getUnitAbbreviation(unitAbbreviation?: ElectricAdmittanceUnits): string; /** * Check if the given ElectricAdmittance are equals to the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns True if the given ElectricAdmittance are equal to the current ElectricAdmittance. */ equals(electricAdmittance: ElectricAdmittance): boolean; /** * Compare the given ElectricAdmittance against the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns 0 if they are equal, -1 if the current ElectricAdmittance is less then other, 1 if the current ElectricAdmittance is greater then other. */ compareTo(electricAdmittance: ElectricAdmittance): number; /** * Add the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ add(electricAdmittance: ElectricAdmittance): ElectricAdmittance; /** * Subtract the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ subtract(electricAdmittance: ElectricAdmittance): ElectricAdmittance; /** * Multiply the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ multiply(electricAdmittance: ElectricAdmittance): ElectricAdmittance; /** * Divide the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ divide(electricAdmittance: ElectricAdmittance): ElectricAdmittance; /** * Modulo the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ modulo(electricAdmittance: ElectricAdmittance): ElectricAdmittance; /** * Pow the given ElectricAdmittance with the current ElectricAdmittance. * @param electricAdmittance The other ElectricAdmittance. * @returns A new ElectricAdmittance instance with the results. */ pow(electricAdmittance: ElectricAdmittance): ElectricAdmittance; }