aboutsummaryrefslogtreecommitdiff
path: root/src/background/operators/impls/DuplicateTabOperator.ts
blob: 7737cfab9e621b6504e2d54a673d500d6b7873cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
import Operator from "../Operator";
import TabPresenter from "../../presenters/TabPresenter";

export default class DuplicateTabOperator implements Operator {
  constructor(private readonly tabPresenter: TabPresenter) {}

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