aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/AddonEnabledController.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-19 21:34:08 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-19 21:34:08 +0900
commitcdfd54ed99087dc4a7a3fd13865849ff9ce9e8ba (patch)
treeca18790151d4e6cf003367f0dd87c27371d2b2c8 /src/background/controllers/AddonEnabledController.ts
parentc7803e7c2911f63e43611290b996f526c0f8aaf2 (diff)
Use TSyringe on background script
Diffstat (limited to 'src/background/controllers/AddonEnabledController.ts')
-rw-r--r--src/background/controllers/AddonEnabledController.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/background/controllers/AddonEnabledController.ts b/src/background/controllers/AddonEnabledController.ts
index 251af25..903df40 100644
--- a/src/background/controllers/AddonEnabledController.ts
+++ b/src/background/controllers/AddonEnabledController.ts
@@ -1,10 +1,12 @@
+import { injectable } from 'tsyringe';
import AddonEnabledUseCase from '../usecases/AddonEnabledUseCase';
+@injectable()
export default class AddonEnabledController {
- private addonEnabledUseCase: AddonEnabledUseCase;
- constructor() {
- this.addonEnabledUseCase = new AddonEnabledUseCase();
+ constructor(
+ private addonEnabledUseCase: AddonEnabledUseCase,
+ ) {
}
indicate(enabled: boolean): Promise<any> {