This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/src/content/client/SettingClient.ts
2019-05-22 20:30:20 +09:00

15 lines
379 B
TypeScript

import Settings from '../../shared/Settings';
import * as messages from '../../shared/messages';
export default interface SettingClient {
load(): Promise<Settings>;
}
export class SettingClientImpl {
async load(): Promise<Settings> {
let settings = await browser.runtime.sendMessage({
type: messages.SETTINGS_QUERY,
});
return settings as Settings;
}
}