Closed julien-blanchon closed 4 months ago
Property 'update' is missing in type '{ subscribe: (this: void, run: Subscriber<string>, invalidate?: Invalidator<string> | undefined) => Unsubscriber; set: (value: string) => void; }' but required in type 'Writable<string>
Currently this is my only workaround:
import { cssVarStore } from 'svelte-legos';
import { storage } from 'svelte-legos';
let bg_css = cssVarStore('--bg');
let bg = storage({ ...bg_css, update: (updater) => bg_css.set(updater($bg_css)) }, 'bg');
Thanks @julien-blanchon for the heads up. Merged the PR.
I would like to use
cssVarStore
store withstorage
one butcssVarStore
don't return update so it's not a Writable and storage is complaining about it