This commit is contained in:
Egor Aristov 2025-05-07 04:13:00 +03:00
parent 5eab39f1c3
commit a839d87ee6
Signed by: egor3f
GPG Key ID: 40482A264AAEC85F

View File

@ -22,8 +22,8 @@ export const useWizardStore = defineStore('wizard', () => {
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(specs)); localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(specs));
}, 100); }, 100);
function updateSpec(fieldName: keyof Specs, newValue: SpecValue) { function updateSpec<K extends keyof Specs>(fieldName: K, newValue: Specs[K]) {
(specs as Record<keyof Specs, SpecValue>)[fieldName] = newValue; specs[fieldName] = newValue;
updateLocalStorage(); updateLocalStorage();
} }
function updateSpecs(newValue: Specs) { function updateSpecs(newValue: Specs) {