🏷️ Add type for Environment mode and remove
raw environment export
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Environment } from "../../enums/Environment";
|
||||
|
||||
const environment = process.env.NODE_ENV;
|
||||
const isDevelopment = environment === "development";
|
||||
const isProduction = environment === "production";
|
||||
const isDevelopment = environment === Environment.development;
|
||||
const isProduction = environment === Environment.production;
|
||||
|
||||
export {
|
||||
environment,
|
||||
isDevelopment,
|
||||
isProduction
|
||||
};
|
4
src/enums/Environment.ts
Normal file
4
src/enums/Environment.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum Environment {
|
||||
development = "development",
|
||||
production = "production"
|
||||
}
|
Reference in New Issue
Block a user