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 ElectricSusceptance */ export interface ElectricSusceptanceDto { /** The value of the ElectricSusceptance */ value: number; /** The specific unit that the ElectricSusceptance value is representing */ unit: ElectricSusceptanceUnits; } /** ElectricSusceptanceUnits enumeration */ export declare enum ElectricSusceptanceUnits { /** */ 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" } /** Electrical susceptance is the imaginary part of admittance, where the real part is conductance. */ export declare class ElectricSusceptance 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 ElectricSusceptance. * @param value The value. * @param fromUnit The ‘ElectricSusceptance’ unit to create from. * The default unit is Siemens */ constructor(value: number, fromUnit?: ElectricSusceptanceUnits); /** * The base value of ElectricSusceptance 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(): ElectricSusceptanceUnits.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 ElectricSusceptance instance from a Siemens * * @param value The unit as Siemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromSiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Mhos * * @param value The unit as Mhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Nanosiemens * * @param value The unit as Nanosiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromNanosiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Microsiemens * * @param value The unit as Microsiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMicrosiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Millisiemens * * @param value The unit as Millisiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMillisiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Kilosiemens * * @param value The unit as Kilosiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromKilosiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Megasiemens * * @param value The unit as Megasiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMegasiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Gigasiemens * * @param value The unit as Gigasiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromGigasiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Terasiemens * * @param value The unit as Terasiemens to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromTerasiemens(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Nanomhos * * @param value The unit as Nanomhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromNanomhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Micromhos * * @param value The unit as Micromhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMicromhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Millimhos * * @param value The unit as Millimhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMillimhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Kilomhos * * @param value The unit as Kilomhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromKilomhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Megamhos * * @param value The unit as Megamhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromMegamhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Gigamhos * * @param value The unit as Gigamhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromGigamhos(value: number): ElectricSusceptance; /** * Create a new ElectricSusceptance instance from a Teramhos * * @param value The unit as Teramhos to create a new ElectricSusceptance from. * @returns The new ElectricSusceptance instance. */ static FromTeramhos(value: number): ElectricSusceptance; /** * Gets the base unit enumeration associated with ElectricSusceptance * @returns The unit enumeration that can be used to interact with this type */ protected static getUnitEnum(): typeof ElectricSusceptanceUnits; /** * 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(): ElectricSusceptanceUnits.Siemens; /** * Create API DTO represent a ElectricSusceptance unit. * @param holdInUnit The specific ElectricSusceptance unit to be used in the unit representation at the DTO */ toDto(holdInUnit?: ElectricSusceptanceUnits): ElectricSusceptanceDto; /** * Create a ElectricSusceptance unit from an API DTO representation. * @param dtoElectricSusceptance The ElectricSusceptance API DTO representation */ static FromDto(dtoElectricSusceptance: ElectricSusceptanceDto): ElectricSusceptance; /** * Convert ElectricSusceptance to a specific unit value. * @param toUnit The specific unit to convert to * @returns The value of the specific unit provided. */ convert(toUnit: ElectricSusceptanceUnits): number; private convertFromBase; private convertToBase; /** * Format the ElectricSusceptance to string. * Note! the default format for ElectricSusceptance is Siemens. * To specify the unit format set the 'unit' parameter. * @param unit The unit to format the ElectricSusceptance. * @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 ElectricSusceptance. */ toString(unit?: ElectricSusceptanceUnits, options?: number | ToStringOptions): string; /** * Get ElectricSusceptance unit abbreviation. * Note! the default abbreviation for ElectricSusceptance is Siemens. * To specify the unit abbreviation set the 'unitAbbreviation' parameter. * @param unitAbbreviation The unit abbreviation of the ElectricSusceptance. * @returns The abbreviation string of ElectricSusceptance. */ getUnitAbbreviation(unitAbbreviation?: ElectricSusceptanceUnits): string; /** * Check if the given ElectricSusceptance are equals to the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns True if the given ElectricSusceptance are equal to the current ElectricSusceptance. */ equals(electricSusceptance: ElectricSusceptance): boolean; /** * Compare the given ElectricSusceptance against the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns 0 if they are equal, -1 if the current ElectricSusceptance is less then other, 1 if the current ElectricSusceptance is greater then other. */ compareTo(electricSusceptance: ElectricSusceptance): number; /** * Add the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ add(electricSusceptance: ElectricSusceptance): ElectricSusceptance; /** * Subtract the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ subtract(electricSusceptance: ElectricSusceptance): ElectricSusceptance; /** * Multiply the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ multiply(electricSusceptance: ElectricSusceptance): ElectricSusceptance; /** * Divide the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ divide(electricSusceptance: ElectricSusceptance): ElectricSusceptance; /** * Modulo the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ modulo(electricSusceptance: ElectricSusceptance): ElectricSusceptance; /** * Pow the given ElectricSusceptance with the current ElectricSusceptance. * @param electricSusceptance The other ElectricSusceptance. * @returns A new ElectricSusceptance instance with the results. */ pow(electricSusceptance: ElectricSusceptance): ElectricSusceptance; }