import AbstractScrollOperator from "./AbstractScrollOperator"; import Operator from "../Operator"; import ScrollPresenter from "../../presenters/ScrollPresenter"; import SettingRepository from "../../repositories/SettingRepository"; export default class ScrollToTopOperator extends AbstractScrollOperator implements Operator { constructor( private readonly presenter: ScrollPresenter, settingRepository: SettingRepository ) { super(settingRepository); } async run(): Promise { const smooth = this.getSmoothScroll(); this.presenter.scrollToTop(smooth); } }