diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/background/presenters/TabPresenter.ts | 24 | ||||
-rw-r--r-- | src/background/repositories/BrowserSettingRepository.ts | 2 |
2 files changed, 23 insertions, 3 deletions
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<Tab>; - create(url: string, opts?: object): Promise<Tab>; + create( + url: string, + opts?: { + active?: boolean; + cookieStoreId?: string; + index?: number; + openerTabId?: number; + pinned?: boolean; + windowId?: number; + } + ): Promise<Tab>; getCurrent(): Promise<Tab>; @@ -44,7 +54,17 @@ export class TabPresenterImpl implements TabPresenter { return browser.tabs.update(tabId, { url }); } - create(url: string, opts?: object): Promise<Tab> { + create( + url: string, + opts?: { + active?: boolean; + cookieStoreId?: string; + index?: number; + openerTabId?: number; + pinned?: boolean; + windowId?: number; + } + ): Promise<Tab> { return browser.tabs.create({ url, ...opts }); } diff --git a/src/background/repositories/BrowserSettingRepository.ts b/src/background/repositories/BrowserSettingRepository.ts index 20013f4..272cc1e 100644 --- a/src/background/repositories/BrowserSettingRepository.ts +++ b/src/background/repositories/BrowserSettingRepository.ts @@ -13,7 +13,7 @@ declare namespace browser.browserSettings.homepageOverride { | "controllable_by_this_extension" | "controlled_by_this_extension"; - function get(param: object): Promise<BrowserSettings>; + function get(param: { [key: string]: string }): Promise<BrowserSettings>; } @injectable() |