Declare setting types

This commit is contained in:
Shin'ya Ueoka 2019-05-05 08:03:29 +09:00
parent d01db82c0d
commit a0882bbceb
48 changed files with 1618 additions and 903 deletions

View file

@ -8,6 +8,7 @@ import MessageListener from '../../MessageListener';
import * as addonActions from '../../actions/addon';
import * as blacklists from '../../../shared/blacklists';
import * as keys from '../../../shared/utils/keys';
import * as actions from '../../actions';
export default class Common {
private win: Window;
@ -45,9 +46,9 @@ export default class Common {
reloadSettings() {
try {
this.store.dispatch(settingActions.load())
.then(({ value: settings }: any) => {
.then((action: actions.SettingAction) => {
let enabled = !blacklists.includes(
settings.blacklist, this.win.location.href
action.settings.blacklist, this.win.location.href
);
this.store.dispatch(addonActions.setEnabled(enabled));
});