aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/PersistentSettingRepository.ts
blob: ff882a5df7fbfe7496ca2089b4c2e30e648cb594 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import SettingData from '../../shared/SettingData';

export default class SettingRepository {
  async load(): Promise<SettingData | null> {
    let { settings } = await browser.storage.local.get('settings');
    if (!settings) {
      return null;
    }
    return SettingData.valueOf(settings as any);
  }
}