So I have this in the javascript for my page:
var TEST_ERROR = { \'SUCCESS\' : 0, \'FAIL\' : -1, \'ID_ERROR\' : -2
The best way to do it is:
export const UserLevel = Object.freeze({ BABY: 1, CHILED: 2 });
Why we need to add freeze UserLevel is const but we can change the values inside, so freeze will make it safe for changes.