aboutsummaryrefslogtreecommitdiff
path: root/src/content/usecases/FocusUseCase.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-20 22:21:31 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-21 20:30:37 +0900
commit1666e626b0d90a53399bf2e79e47b486dbca795c (patch)
treedc49a80f02bdec71639e5389c25e96a14835c856 /src/content/usecases/FocusUseCase.ts
parent71f3a1ea2d3d648db9f628bb1deddc41263ab438 (diff)
Use TSyringe on content script
Diffstat (limited to 'src/content/usecases/FocusUseCase.ts')
-rw-r--r--src/content/usecases/FocusUseCase.ts14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/content/usecases/FocusUseCase.ts b/src/content/usecases/FocusUseCase.ts
index 0ad4021..0158672 100644
--- a/src/content/usecases/FocusUseCase.ts
+++ b/src/content/usecases/FocusUseCase.ts
@@ -1,13 +1,11 @@
-import FocusPresenter, { FocusPresenterImpl }
- from '../presenters/FocusPresenter';
+import { injectable, inject } from 'tsyringe';
+import FocusPresenter from '../presenters/FocusPresenter';
+@injectable()
export default class FocusUseCases {
- private presenter: FocusPresenter;
-
- constructor({
- presenter = new FocusPresenterImpl(),
- } = {}) {
- this.presenter = presenter;
+ constructor(
+ @inject('FocusPresenter') private presenter: FocusPresenter,
+ ) {
}
focusFirstInput() {