static freeze() {
        if ({}.hasOwnProperty.call(this, INITIALIZED)) {
            return this;
        }
        if (this._enumValues.length === 0) {
            throw new Error("Can’t have an enum without any constants (type=’" + this.name + "’)");
        }
        Object.keys(this).forEach(key => {
            const value = this[key];
            const index = this._enumValues.indexOf(value);
            if (index !== -1) {
                value.name = key;
                value.ordinal = index;
            }
        });
        Object.freeze(this._enumValues);
        this[INITIALIZED] = true;
        return this;
    }
/**
     * Initialize and freeze the enum class.
     * @returns {Enum} Reference to this Enum class.
     */
Initialize and freeze the enum class.
@returns {Enum} Reference to this Enum class.
Initialize and freeze the enum class . @returns { Enum } Reference to this Enum class .
static freeze() {
        if ({}.hasOwnProperty.call(this, INITIALIZED)) {
            return this;
        }
        if (this._enumValues.length === 0) {
            throw new Error("Can’t have an enum without any constants (type=’" + this.name + "’)");
        }
        Object.keys(this).forEach(key => {
            const value = this[key];
            const index = this._enumValues.indexOf(value);
            if (index !== -1) {
                value.name = key;
                value.ordinal = index;
            }
        });
        Object.freeze(this._enumValues);
        this[INITIALIZED] = true;
        return this;
    }
static freeze ( ) { if ( { } . hasOwnProperty . call ( this , INITIALIZED ) ) { return this ; } if ( this . _enumValues . length === 0 ) { throw new Error ( "Can’t have an enum without any constants (type=’" + t i .nam e  + " ) );
 } Object . keys ( this ) . forEach ( key => { const value = this [ key ] ; const index = this . _enumValues . indexOf ( value ) ; if ( index !== - 1 ) { value . name = key ; value . ordinal = index ; } } ) ; Object . freeze ( this . _enumValues ) ; this [ INITIALIZED ] = true ; return this ; }
Initialize and freeze the enum class.
Initialize and freeze the enum class .