I am a Java developer, when I want to avoid hardcode values directly in the code, sometimes I create a 'tree' of values like this:
public class Values {
public static final class Development {
public static final class Environment {
public static final String DEBUG = "debug";
public static final String PRO_DEBUG = "pro_debug";
public static final String TEST = "pre_release";
public static final String AUTO_TEST = "auto_test";
public static final String ALPHA = "alpha";
public static final String RELEASE = "release";
}
}
// [etc]
}
I recently moved to Typescript and I want to keep this good practice of avoiding write literals onto my code.
Sometimes I have been used enums but right now I need to write values inside other values to represent the properties of a json configuration file.
What is the correct equivalent in Typescript to do this?