import Operator from "../Operator"; import TabPresenter from "../../presenters/TabPresenter"; import ConsoleClient from "../../infrastructures/ConsoleClient"; export default class CancelOperator implements Operator { constructor( private readonly tabPresenter: TabPresenter, private readonly consoleClient: ConsoleClient ) {} async run(): Promise { const tab = await this.tabPresenter.getCurrent(); return this.consoleClient.hide(tab.id as number); } }