Format Class

Extends

Methods

Name Description
fromJSON(formatProps: SchemaItemFormatProps): Promise<void>    
fromJSONSync(formatProps: SchemaItemFormatProps): void    
hasFormatTrait(formatTrait: FormatTraits): boolean    
toJSON(standalone: booleanfalse, includeSchemaVersion: booleanfalse): SchemaItemFormatProps Save this Format's properties to an object for serializing to JSON.  
isFormat(item?: SchemaItem): item is Format Static Type guard to check if the SchemaItem is of type Format.  

Inherited methods

Name Inherited from Description
equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItemKey | SchemaItem): boolean Static Inherited SchemaItem Indicates if the two SchemaItem objects are equal by comparing their respective key properties.
parseFullName(fullName: string): [string, string] Static Inherited SchemaItem Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings.

Properties

Name Type Description
decimalSeparator Accessor ReadOnly string    
formatTraits Accessor ReadOnly FormatTraits    
includeZero Accessor ReadOnly undefined | boolean    
minWidth Accessor ReadOnly undefined | number    
precision Accessor ReadOnly DecimalPrecision | FractionalPrecision    
roundFactor Accessor ReadOnly number    
schemaItemType Readonly SchemaItemType Get the type of item represented by this instance  
scientificType Accessor ReadOnly undefined | ScientificType    
showSignOption Accessor ReadOnly ShowSignOption    
spacer Accessor ReadOnly undefined | string    
stationOffsetSize Accessor ReadOnly undefined | number    
stationSeparator Accessor ReadOnly string    
thousandSeparator Accessor ReadOnly string    
type Accessor ReadOnly FormatType    
units Accessor ReadOnly undefined | ReadonlyArray<[LazyLoadedUnit | LazyLoadedInvertedUnit, undefined | string]>    
uomSeparator Accessor ReadOnly string    

Inherited properties

Name Type Inherited from Description
description Accessor Inherited ReadOnly undefined | string SchemaItem  
fullName Accessor Inherited ReadOnly string SchemaItem  
key Accessor Inherited ReadOnly SchemaItemKey SchemaItem  
label Accessor Inherited ReadOnly undefined | string SchemaItem  
name Accessor Inherited ReadOnly string SchemaItem  
schema Readonly Inherited Schema SchemaItem  

Defined in

Last Updated: 26 April, 2025