export default class Env { get isProduction(): boolean; get nodeEnv(): StandardNodeEnvValues; get isTest(): boolean; get isDevelopment(): boolean; get isDevelopmentOrTest(): boolean; string(env: StringEnvs, opts?: OptionalConfig): ReturnType; integer(env: IntegerEnvs, opts?: OptionalConfig): ReturnType; /** * Reads a boolean environment variable. Only the exact string `"1"` is * true. Every other value is false, including `"true"`, `"TRUE"`, `"yes"` * and `""`, and so is an unset variable. * * ```ts * // FEATURE_FLAG=1 * AppEnv.boolean('FEATURE_FLAG') // true * * // FEATURE_FLAG=true * AppEnv.boolean('FEATURE_FLAG') // false * ``` * * @param env - the name of the environment variable * @returns `true` when the variable is exactly `"1"`, otherwise `false` */ boolean(env: BooleanEnvs): boolean; setString(env: StringEnvs, val: string | undefined): void; unsetString(env: StringEnvs): void; setInteger(env: IntegerEnvs, val: number | undefined): void; unsetInteger(env: IntegerEnvs): void; /** * Sets a boolean environment variable to `"1"`, the only value * {@link Env.boolean} reads as true. * * @param env - the name of the environment variable */ setBoolean(env: BooleanEnvs): void; /** * Deletes a boolean environment variable. {@link Env.boolean} reads an * unset variable as false, since only the exact string `"1"` is true. * * @param env - the name of the environment variable */ unsetBoolean(env: BooleanEnvs): void; protected required(variable: string): string; protected optional(variable: string): string | undefined; } export type StandardNodeEnvValues = 'production' | 'development' | 'test';