aboutsummaryrefslogtreecommitdiff
path: root/src/shared/settings/storage.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-04-30 21:50:46 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-02 11:14:19 +0900
commit0cffb09e249832291be73be039dc1b9bb38115f9 (patch)
tree3b8783d7a8185ca1524d7b2f9231e43104121204 /src/shared/settings/storage.ts
parent2b8c37e57f1b55dcb562ccf9141ae29bac0e370a (diff)
Types on src/share
Diffstat (limited to 'src/shared/settings/storage.ts')
-rw-r--r--src/shared/settings/storage.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/settings/storage.ts b/src/shared/settings/storage.ts
index 5dce3b0..90a3a66 100644
--- a/src/shared/settings/storage.ts
+++ b/src/shared/settings/storage.ts
@@ -1,12 +1,12 @@
import DefaultSettings from './default';
import * as settingsValues from './values';
-const loadRaw = async() => {
+const loadRaw = async(): Promise<any> => {
let { settings } = await browser.storage.local.get('settings');
if (!settings) {
return DefaultSettings;
}
- return { ...DefaultSettings, ...settings };
+ return { ...DefaultSettings, ...settings as object };
};
const loadValue = async() => {
@@ -23,7 +23,7 @@ const loadValue = async() => {
return { ...settingsValues.valueFromJson(DefaultSettings.json), ...value };
};
-const save = (settings) => {
+const save = (settings: any): Promise<any> => {
return browser.storage.local.set({
settings,
});