/** @typedef {'pushs' | 'voice' | 'shock'} NoticePrefKey */ /** * @param {import('vuex').Store} store * @param {NoticePrefKey} key * @param {boolean} value */ export function persistNoticePref(store, key, value) { if (!store || typeof store.commit !== 'function') return store.commit('user/apply', { [key]: value }) }