API Reference > ecschema-Metadata > Metadata > Constant Constant Class Beta A Constant is a specific type of Unit that represents a number. Extends SchemaItem Methods Name Description constructor(schema: Schema, name: string): Constant fromJSON(constantProps: ConstantProps): Promise<void> fromJSONSync(constantProps: ConstantProps): void toJSON(standalone: boolean, includeSchemaVersion: boolean): ConstantProps Save this Constants 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 _definition Protected string _denominator Protected number _numerator Protected number _phenomenon Protected undefined | LazyLoadedPhenomenon definition Accessor ReadOnly string denominator Accessor ReadOnly number numerator Accessor ReadOnly number phenomenon Accessor ReadOnly undefined | LazyLoadedPhenomenon schemaItemType Readonly Constant 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 core/ecschema-metadata/src/Metadata/Constant.ts Line 24 Last Updated: 11 June, 2024