KindOfQuantity Class
Beta
A Typescript class representation of a KindOfQuantity.
Extends
Methods
| Name | Description | |
|---|---|---|
| constructor(schema: Schema, name: string): KindOfQuantity | ||
| addPresentationFormat(format: Format | OverrideFormat, isDefault: boolean = false): void Protected | ||
| createFormatOverride(parent: Format, precision?: number, unitLabelOverrides?: [Unit | InvertedUnit, undefined | string][]): OverrideFormat Protected | Creates an OverrideFormat in the context of this KindOfQuantity. | |
| fromJSON(kindOfQuantityProps: KindOfQuantityProps): Promise<void> | ||
| fromJSONSync(kindOfQuantityProps: KindOfQuantityProps): void | ||
| toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): KindOfQuantityProps | Save this KindOfQuantity's properties to an object for serializing to JSON. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| equalByKey(thisSchemaItem: SchemaItem, thatSchemaItemOrKey?: SchemaItem | SchemaItemKey): boolean Static | SchemaItem | Indicates if the two SchemaItem objects are equal by comparing their respective SchemaItem.key properties. |
| parseFullName(fullName: string): [string, string] Static | SchemaItem | Parses the given full name, {schemaName}.{schemaItemName} or {schemaName}:{schemaItemName}, into two separate strings. |
Properties
| Name | Type | Description | |
|---|---|---|---|
| _persistenceUnit Protected | LazyLoadedUnit | LazyLoadedInvertedUnit | ||
| _presentationFormats Protected | Format | OverrideFormat[] | ||
| _relativeError Protected | number | ||
| defaultPresentationFormat Accessor ReadOnly | undefined | Format | OverrideFormat | The first presentation format in the list of Formats. | |
| persistenceUnit Accessor ReadOnly | undefined | LazyLoadedUnit | LazyLoadedInvertedUnit | ||
| presentationFormats Accessor ReadOnly | Format | OverrideFormat[] | A list of presentation formats. | |
| relativeError Accessor ReadOnly | number | ||
| schemaItemType Readonly | KindOfQuantity |
Inherited properties
| Name | Type | Inherited from | Description |
|---|---|---|---|
| _description Protected | undefined | string | SchemaItem | |
| _key Protected | SchemaItemKey | SchemaItem | |
| _label Protected | undefined | string | SchemaItem | |
| description Accessor ReadOnly | undefined | string | SchemaItem | |
| fullName Accessor ReadOnly | string | SchemaItem | |
| key Accessor ReadOnly | SchemaItemKey | SchemaItem | |
| label Accessor ReadOnly | undefined | string | SchemaItem | |
| name Accessor ReadOnly | string | SchemaItem | |
| schema Readonly | Schema | SchemaItem |
Defined in
Last Updated: 30 November, 2023