Enumeration Class
Beta
A Typescript class representation of an ECEnumeration.
Extends
Methods
Name |
Description |
|
constructor(schema: Schema, name: string, primitiveType?: Integer | String): Enumeration |
|
|
addEnumerator(enumerator: AnyEnumerator): void Protected |
Adds enumerator to list of enumerators on this Enumeration |
|
createEnumerator(name: string, value: string | number, label?: string, description?: string): AnyEnumerator |
Creates an Enumerator with the provided name and value as well as optional parameters label and description |
|
fromJSON(enumerationProps: EnumerationProps): Promise<void> |
|
|
fromJSONSync(enumerationProps: EnumerationProps): void |
|
|
getEnumerator(value: string): undefined | Enumerator<string> |
Gets an enumerator that matches the value provided. |
|
getEnumerator(value: number): undefined | Enumerator<number> |
|
|
getEnumeratorByName(name: string): undefined | AnyEnumerator |
Gets an enumerator that matches the name provided. |
|
toJSON(standalone: boolean = false, includeSchemaVersion: boolean = false): EnumerationProps |
Save this Enumeration's properties to an object for serializing to JSON. |
|
Inherited methods
Properties
Name |
Type |
Description |
|
_enumerators Protected |
AnyEnumerator[] |
|
|
_isStrict Protected |
boolean |
|
|
_type Protected |
Integer | String |
|
|
enumerators Accessor ReadOnly |
AnyEnumerator[] |
|
|
isInt Accessor ReadOnly |
boolean |
|
|
isStrict Accessor ReadOnly |
boolean |
|
|
isString Accessor ReadOnly |
boolean |
|
|
schemaItemType Readonly |
Enumeration |
|
|
type Accessor ReadOnly |
undefined | Integer | String |
|
|
Inherited properties
Defined in
Last Updated:
20 June, 2023