From 1f10eac90011e6c3c1ad20ce91b358911dc74dcb Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 11 Aug 2020 21:34:11 +0900 Subject: Enable @typescript-eslint/ban-types rule --- src/background/presenters/TabPresenter.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/background/presenters') diff --git a/src/background/presenters/TabPresenter.ts b/src/background/presenters/TabPresenter.ts index 09cfa23..2f8f5d9 100644 --- a/src/background/presenters/TabPresenter.ts +++ b/src/background/presenters/TabPresenter.ts @@ -8,7 +8,17 @@ type Tab = browser.tabs.Tab; export default interface TabPresenter { open(url: string, tabId?: number): Promise; - create(url: string, opts?: object): Promise; + create( + url: string, + opts?: { + active?: boolean; + cookieStoreId?: string; + index?: number; + openerTabId?: number; + pinned?: boolean; + windowId?: number; + } + ): Promise; getCurrent(): Promise; @@ -44,7 +54,17 @@ export class TabPresenterImpl implements TabPresenter { return browser.tabs.update(tabId, { url }); } - create(url: string, opts?: object): Promise { + create( + url: string, + opts?: { + active?: boolean; + cookieStoreId?: string; + index?: number; + openerTabId?: number; + pinned?: boolean; + windowId?: number; + } + ): Promise { return browser.tabs.create({ url, ...opts }); } -- cgit v1.2.3