Both Vue and Svelte us something that I call Runes. These are special functions that have special meaning to the framework. I find these concepts parallel. Svelte uses $derived(), which is similar to Vue's computed(). Svelte uses $state(), which is similar to Vue's Ref().

These special functions are often used to wrap the variable values you want to use. For normal use the framework makes the rune transparent, but for debugging you get a function or something similar--not the actual value.

Vue provides a function, toRaw() for debugging purposes to dump the value.

But, is there a Svelte equivalent?

Yes, there is!

It is called $state.snapshot(). I had to use this today when making a deep copy of an array with structuredClone(). I could not make a copy of the $state() proxy, because that is not supported by structuredClone(), so I had to use the snapshot to get the value.