Preparing search index...
The search index is not available
lootex - v0.2.0
lootex
utils
CurrencyAmount
Class CurrencyAmount<T>
Type Parameters
T
extends
MinimalToken
=
Token
Hierarchy (
view full
)
Fraction
CurrencyAmount
Index
Constructors
constructor
Properties
currency
decimal
Scale
denominator
numerator
Methods
add
divide
equal
To
greater
Than
invert
less
Than
multiply
quotient
subtract
to
Fixed
to
Significant
from
Decimal
from
Formatted
Amount
from
Fractional
Amount
from
Raw
Amount
is
Fraction
to
Fraction
Constructors
constructor
new
Currency
Amount
<
T
>
(
currency
,
numerator
,
denominator
?
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
=
Token
Parameters
currency
:
T
numerator
:
BigintIsh
Optional
denominator
:
BigintIsh
Returns
CurrencyAmount
<
T
>
Properties
Readonly
currency
currency
:
T
Readonly
decimal
Scale
decimal
Scale
:
bigint
Readonly
denominator
denominator
:
bigint
Readonly
numerator
numerator
:
bigint
Methods
add
add
<
T
>
(
other
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
Parameters
other
:
CurrencyAmount
<
T
>
Returns
CurrencyAmount
<
T
>
divide
divide
(
other
)
:
Fraction
Parameters
other
:
BigintIsh
|
Fraction
Returns
Fraction
equal
To
equal
To
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
greater
Than
greater
Than
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
invert
invert
(
)
:
Fraction
Returns
Fraction
less
Than
less
Than
(
other
)
:
boolean
Parameters
other
:
BigintIsh
|
Fraction
Returns
boolean
multiply
multiply
(
other
)
:
CurrencyAmount
<
T
>
Parameters
other
:
BigintIsh
|
Fraction
Returns
CurrencyAmount
<
T
>
quotient
quotient
(
)
:
bigint
Returns
bigint
subtract
subtract
<
T
>
(
other
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
Parameters
other
:
CurrencyAmount
<
T
>
Returns
CurrencyAmount
<
T
>
to
Fixed
to
Fixed
(
decimalPlaces
?
,
rounding
?
)
:
string
Parameters
decimalPlaces
:
number
= ...
Optional
rounding
:
Rounding
Returns
string
to
Significant
to
Significant
(
significantDigits
?
,
rounding
?
)
:
string
Parameters
significantDigits
:
number
= 6
Optional
rounding
:
Rounding
Returns
string
Static
from
Decimal
from
Decimal
(
decimalStr
)
:
Fraction
Parameters
decimalStr
:
string
|
number
Returns
Fraction
Static
from
Formatted
Amount
from
Formatted
Amount
<
T
>
(
currency
,
formattedAmount
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
Parameters
currency
:
T
formattedAmount
:
string
|
number
Returns
CurrencyAmount
<
T
>
Static
from
Fractional
Amount
from
Fractional
Amount
<
T
>
(
currency
,
numerator
,
denominator
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
Parameters
currency
:
T
numerator
:
BigintIsh
denominator
:
BigintIsh
Returns
CurrencyAmount
<
T
>
Static
from
Raw
Amount
from
Raw
Amount
<
T
>
(
currency
,
rawAmount
)
:
CurrencyAmount
<
T
>
Type Parameters
T
extends
MinimalToken
Parameters
currency
:
T
rawAmount
:
BigintIsh
Returns
CurrencyAmount
<
T
>
Static
is
Fraction
is
Fraction
(
value
)
:
value
is
Fraction
Parameters
value
:
unknown
Returns
value
is
Fraction
Static
to
Fraction
to
Fraction
(
fractionish
)
:
Fraction
Parameters
fractionish
:
BigintIsh
|
Fraction
Returns
Fraction
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
currency
decimal
Scale
denominator
numerator
Methods
add
divide
equal
To
greater
Than
invert
less
Than
multiply
quotient
subtract
to
Fixed
to
Significant
from
Decimal
from
Formatted
Amount
from
Fractional
Amount
from
Raw
Amount
is
Fraction
to
Fraction
lootex - v0.2.0
Loading...