From 0cffb09e249832291be73be039dc1b9bb38115f9 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Tue, 30 Apr 2019 21:50:46 +0900 Subject: Types on src/share --- src/shared/settings/storage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/settings/storage.ts') 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 => { 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 => { return browser.storage.local.set({ settings, }); -- cgit v1.2.3