aboutsummaryrefslogtreecommitdiff
path: root/src/content/client/SettingClient.ts
blob: c67f544493deebf6a3597d2c6158d780c74c3d27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Settings from '../../shared/Settings';
import * as messages from '../../shared/messages';

export default interface SettingClient {
  load(): Promise<Settings>;

  // eslint-disable-next-line semi
}

export class SettingClientImpl {
  async load(): Promise<Settings> {
    let settings = await browser.runtime.sendMessage({
      type: messages.SETTINGS_QUERY,
    });
    return settings as Settings;
  }
}