JS1230: Enum declaration not allowed in this context
An enumeration declaration exists in an inappropriate context. Enumeration declarations are allowed only in the main program block, inside classes, inside packages, or in functions.
To correct this error
Define the enumeration in the main program block, inside a class, inside a package, or in a function.