aboutsummaryrefslogtreecommitdiff
path: root/src/background/operators/impls/StartFindOperator.ts
blob: 284ac9b76ecd7a9f0c984703cb1bc223ddfabb50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import Operator from "../Operator";
import TabPresenter from "../../presenters/TabPresenter";
import ConsoleClient from "../../infrastructures/ConsoleClient";

export default class StartFindOperator implements Operator {
  constructor(
    private readonly tabPresenter: TabPresenter,
    private readonly consoleClient: ConsoleClient
  ) {}

  async run(): Promise<void> {
    const tab = await this.tabPresenter.getCurrent();
    return this.consoleClient.showFind(tab.id as number);
  }
}