You'd do it the same way is in ES5, with Object.defineProperty:
class AlphabetEnum {} ['a', 'b', 'c', ..., 'z'].forEach(letter => { Object.defineProperty(AlphabetEnum, letter.toUpperCase(), { get: () => letter, configurable: true, // remove this line if not needed / wanted }); }); However, using a class just for static properties is an anitanti-pattern IMO. In that case you can as well use a plain object:
var AlphabetEnum = {};