diff options
Diffstat (limited to 'src/background/repositories')
-rw-r--r-- | src/background/repositories/BrowserSettingRepository.ts | 6 | ||||
-rw-r--r-- | src/background/repositories/RepeatRepository.ts | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/background/repositories/BrowserSettingRepository.ts b/src/background/repositories/BrowserSettingRepository.ts index e24874b..1dde190 100644 --- a/src/background/repositories/BrowserSettingRepository.ts +++ b/src/background/repositories/BrowserSettingRepository.ts @@ -1,8 +1,12 @@ import { injectable } from "tsyringe"; import * as urls from "../../shared/urls"; +export default interface BrowserSettingRepository { + getHomepageUrls(): Promise<string[]>; +} + @injectable() -export default class BrowserSettingRepository { +export class BrowserSettingRepositoryImpl implements BrowserSettingRepository { async getHomepageUrls(): Promise<string[]> { const { value } = await browser.browserSettings.homepageOverride.get({}); return value.split("|").map(urls.normalizeUrl); diff --git a/src/background/repositories/RepeatRepository.ts b/src/background/repositories/RepeatRepository.ts index e3ab43d..00098d3 100644 --- a/src/background/repositories/RepeatRepository.ts +++ b/src/background/repositories/RepeatRepository.ts @@ -4,8 +4,14 @@ import MemoryStorage from "../infrastructures/MemoryStorage"; const REPEAT_KEY = "repeat"; +export default interface RepeatRepository { + getLastOperation(): Operation | undefined; + + setLastOperation(op: Operation): void; +} + @injectable() -export default class RepeatRepository { +export class RepeatRepositoryImpl implements RepeatRepository { private cache: MemoryStorage; constructor() { |