Types on src/background

This commit is contained in:
Shin'ya Ueoka 2019-05-01 11:04:24 +09:00
parent 0cffb09e24
commit 678020a3a2
48 changed files with 446 additions and 431 deletions

View file

@ -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);
}
}