BaseFormat Class @beta
A base Format class with shared properties and functionality between quantity and ecschema-metadata Format classes
Extended by
Methods
| Name | Description | |
|---|---|---|
| constructor(name: string): BaseFormat | ||
| hasFormatTraitSet(formatTrait: FormatTraits): boolean | This method returns true if the formatTrait is set in this Format object. | |
| loadFormatProperties(formatProps: FormatProps | ResolvedFormatProps): void | ||
| parseFormatTraits(formatTraitsFromJson: string | string[]): void | This method parses input string that is typically extracted for persisted JSON data and validates that the string is a valid FormatType. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| _allowMathematicOperations Protected | boolean | ||
| _azimuthBase Protected | number | undefined | ||
| _azimuthBaseUnit Protected | UnitProps | undefined | ||
| _azimuthCounterClockwise Protected | boolean | undefined | ||
| _decimalSeparator Protected | string | ||
| _formatTraits Protected | FormatTraits | ||
| _includeZero Protected | boolean | ||
| _minWidth Protected | number | undefined | ||
| _precision Protected | number | ||
| _ratioType Protected | RatioType | undefined | ||
| _revolutionUnit Protected | UnitProps | undefined | ||
| _roundFactor Protected | number | ||
| _scientificType Protected | ScientificType | undefined | ||
| _showSignOption Protected | ShowSignOption | ||
| _spacer Protected | string | ||
| _stationBaseFactor Protected | number | undefined | ||
| _stationOffsetSize Protected | number | undefined | ||
| _stationSeparator Protected | string | ||
| _thousandSeparator Protected | string | ||
| _type Protected | FormatType | ||
| _uomSeparator Protected | string | ||
| allowMathematicOperations Accessor | boolean | ||
| allowMathematicOperations Setter | allowMathematicOperations(allowMathematicOperations: boolean): void | ||
| azimuthBase Accessor | undefined | number | ||
| azimuthBase Setter | azimuthBase(azimuthBase: number): void | ||
| azimuthBaseUnit Accessor | undefined | UnitProps | ||
| azimuthBaseUnit Setter | azimuthBaseUnit(azimuthBaseUnit: UnitProps): void | ||
| azimuthClockwiseOrDefault Accessor ReadOnly | boolean | ||
| azimuthCounterClockwise Accessor | undefined | boolean | ||
| azimuthCounterClockwise Setter | azimuthCounterClockwise(azimuthCounterClockwise: boolean): void | ||
| decimalSeparator Accessor | string | ||
| decimalSeparator Setter | decimalSeparator(decimalSeparator: string): void | ||
| formatTraits Accessor | FormatTraits | ||
| formatTraits Setter | formatTraits(formatTraits: FormatTraits): void | ||
| includeZero Accessor | undefined | boolean | ||
| includeZero Setter | includeZero(includeZero: boolean): void | ||
| minWidth Accessor | undefined | number | ||
| minWidth Setter | minWidth(minWidth: number): void | ||
| name Accessor ReadOnly | string | ||
| precision Accessor | DecimalPrecision | FractionalPrecision | ||
| precision Setter | precision(precision: DecimalPrecision | FractionalPrecision): void | ||
| ratioType Accessor | undefined | RatioType | ||
| ratioType Setter | ratioType(ratioType: RatioType): void | ||
| revolutionUnit Accessor | undefined | UnitProps | ||
| revolutionUnit Setter | revolutionUnit(revolutionUnit: UnitProps): void | ||
| roundFactor Accessor | number | ||
| roundFactor Setter | roundFactor(roundFactor: number): void | ||
| scientificType Accessor | undefined | ScientificType | ||
| scientificType Setter | scientificType(scientificType: ScientificType): void | ||
| showSignOption Accessor | ShowSignOption | ||
| showSignOption Setter | showSignOption(showSignOption: ShowSignOption): void | ||
| spacer Accessor | undefined | string | ||
| spacer Setter | spacer(spacer: string): void | ||
| spacerOrDefault Accessor ReadOnly | string | ||
| stationBaseFactor Accessor | undefined | number | Gets the station base factor used for station formatting. | |
| stationBaseFactor Setter | stationBaseFactor(stationBaseFactor: number): void | ||
| stationOffsetSize Accessor | undefined | number | ||
| stationOffsetSize Setter | stationOffsetSize(stationOffsetSize: number): void | ||
| stationSeparator Accessor | string | ||
| stationSeparator Setter | stationSeparator(stationSeparator: string): void | ||
| thousandSeparator Accessor | string | ||
| thousandSeparator Setter | thousandSeparator(thousandSeparator: string): void | ||
| type Accessor | FormatType | ||
| type Setter | type(formatType: FormatType): void | ||
| uomSeparator Accessor | string | ||
| uomSeparator Setter | uomSeparator(uomSeparator: string): void |
Defined in
- quantity/src/Formatter/Format.ts Line 26
Last Updated: 28 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.