summaryrefslogtreecommitdiff
path: root/app_expo/models/environment.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app_expo/models/environment.ts')
-rw-r--r--app_expo/models/environment.ts40
1 files changed, 0 insertions, 40 deletions
diff --git a/app_expo/models/environment.ts b/app_expo/models/environment.ts
deleted file mode 100644
index a29586b..0000000
--- a/app_expo/models/environment.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Api } from '../services/api'
-
-let ReactotronDev
-if (__DEV__) {
- const { Reactotron } = require('../services/reactotron')
- ReactotronDev = Reactotron
-}
-
-/**
- * The environment is a place where services and shared dependencies between
- * models live. They are made available to every model via dependency injection.
- */
-export class Environment {
- constructor() {
- // create each service
- if (__DEV__) {
- // dev-only services
- this.reactotron = new ReactotronDev()
- }
- this.api = new Api()
- }
-
- async setup() {
- // allow each service to setup
- if (__DEV__) {
- await this.reactotron.setup()
- }
- await this.api.setup()
- }
-
- /**
- * Reactotron is only available in dev.
- */
- reactotron: typeof ReactotronDev
-
- /**
- * Our api.
- */
- api: Api
-}