From 7305bc1c34ceced31db943c8f23ed826d3d522f0 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Thu, 3 Dec 2020 23:13:08 +0900 Subject: Make WindowPresenter interface --- src/background/presenters/WindowPresenter.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/background/presenters') diff --git a/src/background/presenters/WindowPresenter.ts b/src/background/presenters/WindowPresenter.ts index 4f37f5d..5eb0f22 100644 --- a/src/background/presenters/WindowPresenter.ts +++ b/src/background/presenters/WindowPresenter.ts @@ -1,8 +1,9 @@ -import { injectable } from "tsyringe"; +export default interface WindowPresenter { + create(url: string): Promise; +} -@injectable() -export default class WindowPresenter { - create(url: string): Promise { - return browser.windows.create({ url }); +export class WindowPresenterImpl implements WindowPresenter { + async create(url: string): Promise { + await browser.windows.create({ url }); } } -- cgit v1.2.3