I'm making a Javascript class and I'd like to have a public static field like in Java. This is the relevant code:
export default class Agent {
CIRCLE: 1,
SQUARE: 2,
...
This is the error I get:
line 2, col 11, Class properties must be methods. Expected '(' but instead saw ':'.
It looks like ES6 modules don't allow this. Is there a way to get the desired behavior or do I have to write a getter?