🏷️ 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 environment = process.env.NODE_ENV;
|
||||||
const isDevelopment = environment === "development";
|
const isDevelopment = environment === Environment.development;
|
||||||
const isProduction = environment === "production";
|
const isProduction = environment === Environment.production;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
environment,
|
|
||||||
isDevelopment,
|
isDevelopment,
|
||||||
isProduction
|
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