diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-01 11:04:24 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-02 22:07:53 +0900 |
commit | 678020a3a27713e77ec8d74483122b4258fbc829 (patch) | |
tree | 6c84d0965f05918e6fd58a0a155c15035474d563 /src/background/usecases/FindUseCase.ts | |
parent | 0cffb09e249832291be73be039dc1b9bb38115f9 (diff) |
Types on src/background
Diffstat (limited to 'src/background/usecases/FindUseCase.ts')
-rw-r--r-- | src/background/usecases/FindUseCase.ts | 14 |
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); } } |