How do I make a “public static field” in an ES6 class?

class Agent { static get CIRCLE() { return 1; } static get SQUARE() { return 2; } } console.log(Agent.CIRCLE); // 1 class Shape { } Shape.CIRCLE = 1; Shape.SQUARE = 2; console.log(Shape.CIRCLE); // 1 class MyClass { static get MY_CONST() { delete MyClass.MY_CONST; return (MyClass.MY_CONST = ‘string’); } static set MY_CONST(value) { delete MyClass.MY_CONST; MyClass.MY_CONST…

Read More