You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/store-resubscribe-observable/main.svelte

12 lines
257 B

<script>
import { writable } from 'svelte/store';
function fake_observable(store) {
return { subscribe: cb => ({ unsubscribe: store.subscribe(cb) }) };
}
let foo = fake_observable(writable(0));
foo = fake_observable(writable(42));
</script>
{$foo}