You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

18 lines
484 B

import { JSONTextSettings, SettingSource } from '../../src/shared/SettingData';
import Settings from '../../src/shared/settings/Settings';
export default class SettingRepository {
constructor(
private readonly browser: any,
) {
}
async saveJSON(settings: Settings): Promise<void> {
await this.browser.storage.local.set({
settings: {
source: SettingSource.JSON,
json: JSONTextSettings.fromSettings(settings).toJSONText(),
}
});
}
}