RounderParams overview
This module implements a CVRounderParams, i.e. an object from which a CVRounder can be built
Table of contents
Constructors
make
Constructs a CVRounderParams with the specified precision and roundingOption
Signature
export declare const make: ({
precision,
roundingOption
}?: {
readonly precision?: number
readonly roundingOption?: CVRoundingOption.Type
}) => Type
Equivalences
equivalence
Equivalence
Signature
export declare const equivalence: Equivalence.Equivalence<Type>
Getters
precision
Returns the precision property of self
Signature
export declare const precision: MTypes.OneArgFunction<Type, number>
roundingOption
Returns the roundingOption property of self
Signature
export declare const roundingOption: MTypes.OneArgFunction<Type, CVRoundingOption.Type>
Instances
halfExpand2
CVRounderParams instance that uses the HalfExpand CVRoundingOption and precision=2. Can be used in accounting apps of most countries throughout the world
Signature
export declare const halfExpand2: Type
Models
Type (class)
Type of a CVRounderParams
Signature
export declare class Type {
private constructor({ precision, roundingOption }: MTypes.Data<Type>)
}
make (static method)
Static constructor
Signature
static make(params: MTypes.Data<Type>): Type
[MData.idSymbol] (method)
Returns the id of this
Signature
[MData.idSymbol](): string | (() => string)
[Hash.symbol] (method)
Calculates the hash value of this
Signature
[Hash.symbol](): number
[MEquivalenceBasedEqualityData.isEquivalentToSymbol] (method)
Function that implements the equivalence of this and that
Signature
[MEquivalenceBasedEqualityData.isEquivalentToSymbol](this: this, that: this): boolean
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol] (method)
Predicate that returns true if that has the same type marker as this
Signature
[MEquivalenceBasedEqualityData.hasSameTypeMarkerAsSymbol](that: unknown): boolean
precision (property)
The precision at which to round the number. Must be a finite positive integer.
Signature
readonly precision: number
roundingOption (property)
The rounding mode to use
Signature
readonly roundingOption: CVRoundingOption.Type
Module markers
moduleTag
Module tag
Signature
export declare const moduleTag: "@parischap/conversions/rounding/RounderParams/"