unitsnet-js
Version:
A better way to hold unit variables and easily convert to the destination unit
207 lines (206 loc) • 10 kB
TypeScript
import { BaseUnit, ToStringOptions } from "../base-unit";
/** API DTO represents a ElectricCurrentGradient */
export interface ElectricCurrentGradientDto {
/** The value of the ElectricCurrentGradient */
value: number;
/** The specific unit that the ElectricCurrentGradient value is representing */
unit: ElectricCurrentGradientUnits;
}
/** ElectricCurrentGradientUnits enumeration */
export declare enum ElectricCurrentGradientUnits {
/** */
AmperesPerSecond = "AmperePerSecond",
/** */
AmperesPerMinute = "AmperePerMinute",
/** */
AmperesPerMillisecond = "AmperePerMillisecond",
/** */
AmperesPerMicrosecond = "AmperePerMicrosecond",
/** */
AmperesPerNanosecond = "AmperePerNanosecond",
/** */
MilliamperesPerSecond = "MilliamperePerSecond",
/** */
MilliamperesPerMinute = "MilliamperePerMinute"
}
/** In electromagnetism, the current gradient describes how the current changes in time. */
export declare class ElectricCurrentGradient extends BaseUnit {
protected value: number;
private amperespersecondLazy;
private amperesperminuteLazy;
private amperespermillisecondLazy;
private amperespermicrosecondLazy;
private amperespernanosecondLazy;
private milliamperespersecondLazy;
private milliamperesperminuteLazy;
/**
* Create a new ElectricCurrentGradient.
* @param value The value.
* @param fromUnit The ‘ElectricCurrentGradient’ unit to create from.
* The default unit is AmperesPerSecond
*/
constructor(value: number, fromUnit?: ElectricCurrentGradientUnits);
/**
* The base value of ElectricCurrentGradient is AmperesPerSecond.
* 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(): ElectricCurrentGradientUnits.AmperesPerSecond;
/** */
get AmperesPerSecond(): number;
/** */
get AmperesPerMinute(): number;
/** */
get AmperesPerMillisecond(): number;
/** */
get AmperesPerMicrosecond(): number;
/** */
get AmperesPerNanosecond(): number;
/** */
get MilliamperesPerSecond(): number;
/** */
get MilliamperesPerMinute(): number;
/**
* Create a new ElectricCurrentGradient instance from a AmperesPerSecond
*
* @param value The unit as AmperesPerSecond to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromAmperesPerSecond(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a AmperesPerMinute
*
* @param value The unit as AmperesPerMinute to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromAmperesPerMinute(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a AmperesPerMillisecond
*
* @param value The unit as AmperesPerMillisecond to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromAmperesPerMillisecond(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a AmperesPerMicrosecond
*
* @param value The unit as AmperesPerMicrosecond to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromAmperesPerMicrosecond(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a AmperesPerNanosecond
*
* @param value The unit as AmperesPerNanosecond to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromAmperesPerNanosecond(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a MilliamperesPerSecond
*
* @param value The unit as MilliamperesPerSecond to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromMilliamperesPerSecond(value: number): ElectricCurrentGradient;
/**
* Create a new ElectricCurrentGradient instance from a MilliamperesPerMinute
*
* @param value The unit as MilliamperesPerMinute to create a new ElectricCurrentGradient from.
* @returns The new ElectricCurrentGradient instance.
*/
static FromMilliamperesPerMinute(value: number): ElectricCurrentGradient;
/**
* Gets the base unit enumeration associated with ElectricCurrentGradient
* @returns The unit enumeration that can be used to interact with this type
*/
protected static getUnitEnum(): typeof ElectricCurrentGradientUnits;
/**
* 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(): ElectricCurrentGradientUnits.AmperesPerSecond;
/**
* Create API DTO represent a ElectricCurrentGradient unit.
* @param holdInUnit The specific ElectricCurrentGradient unit to be used in the unit representation at the DTO
*/
toDto(holdInUnit?: ElectricCurrentGradientUnits): ElectricCurrentGradientDto;
/**
* Create a ElectricCurrentGradient unit from an API DTO representation.
* @param dtoElectricCurrentGradient The ElectricCurrentGradient API DTO representation
*/
static FromDto(dtoElectricCurrentGradient: ElectricCurrentGradientDto): ElectricCurrentGradient;
/**
* Convert ElectricCurrentGradient to a specific unit value.
* @param toUnit The specific unit to convert to
* @returns The value of the specific unit provided.
*/
convert(toUnit: ElectricCurrentGradientUnits): number;
private convertFromBase;
private convertToBase;
/**
* Format the ElectricCurrentGradient to string.
* Note! the default format for ElectricCurrentGradient is AmperesPerSecond.
* To specify the unit format set the 'unit' parameter.
* @param unit The unit to format the ElectricCurrentGradient.
* @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 ElectricCurrentGradient.
*/
toString(unit?: ElectricCurrentGradientUnits, options?: number | ToStringOptions): string;
/**
* Get ElectricCurrentGradient unit abbreviation.
* Note! the default abbreviation for ElectricCurrentGradient is AmperesPerSecond.
* To specify the unit abbreviation set the 'unitAbbreviation' parameter.
* @param unitAbbreviation The unit abbreviation of the ElectricCurrentGradient.
* @returns The abbreviation string of ElectricCurrentGradient.
*/
getUnitAbbreviation(unitAbbreviation?: ElectricCurrentGradientUnits): string;
/**
* Check if the given ElectricCurrentGradient are equals to the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns True if the given ElectricCurrentGradient are equal to the current ElectricCurrentGradient.
*/
equals(electricCurrentGradient: ElectricCurrentGradient): boolean;
/**
* Compare the given ElectricCurrentGradient against the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns 0 if they are equal, -1 if the current ElectricCurrentGradient is less then other, 1 if the current ElectricCurrentGradient is greater then other.
*/
compareTo(electricCurrentGradient: ElectricCurrentGradient): number;
/**
* Add the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
add(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
/**
* Subtract the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
subtract(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
/**
* Multiply the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
multiply(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
/**
* Divide the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
divide(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
/**
* Modulo the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
modulo(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
/**
* Pow the given ElectricCurrentGradient with the current ElectricCurrentGradient.
* @param electricCurrentGradient The other ElectricCurrentGradient.
* @returns A new ElectricCurrentGradient instance with the results.
*/
pow(electricCurrentGradient: ElectricCurrentGradient): ElectricCurrentGradient;
}