aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases/FindUseCase.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/usecases/FindUseCase.ts')
-rw-r--r--src/background/usecases/FindUseCase.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/background/usecases/FindUseCase.ts b/src/background/usecases/FindUseCase.ts
index 224e4a9..d567800 100644
--- a/src/background/usecases/FindUseCase.ts
+++ b/src/background/usecases/FindUseCase.ts
@@ -3,22 +3,28 @@ import TabPresenter from '../presenters/TabPresenter';
import ConsoleClient from '../infrastructures/ConsoleClient';
export default class FindUseCase {
+ private tabPresenter: TabPresenter;
+
+ private findRepository: FindRepository;
+
+ private consoleClient: ConsoleClient;
+
constructor() {
this.tabPresenter = new TabPresenter();
this.findRepository = new FindRepository();
this.consoleClient = new ConsoleClient();
}
- getKeyword() {
+ getKeyword(): Promise<string> {
return this.findRepository.getKeyword();
}
- setKeyword(keyword) {
+ setKeyword(keyword: string): Promise<any> {
return this.findRepository.setKeyword(keyword);
}
- async findStart() {
+ async findStart(): Promise<any> {
let tab = await this.tabPresenter.getCurrent();
- return this.consoleClient.showFind(tab.id);
+ return this.consoleClient.showFind(tab.id as number);
}
}