1
0

🏷️ Add type for Environment mode and remove

raw environment export
This commit is contained in:
2021-06-19 23:00:41 +02:00
parent 0e75fd62c6
commit 3ffbd156cd
2 changed files with 8 additions and 3 deletions

View File

@@ -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
View File

@@ -0,0 +1,4 @@
export enum Environment {
development = "development",
production = "production"
}