Skip to content

Commit c915f59

Browse files
committed
may as well update the test case to match the docs
1 parent 122f44b commit c915f59

File tree

1 file changed

+6
-6
lines changed
  • packages/svelte/tests/runtime-runes/samples/state-is

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script>
2-
let state = $state({});
3-
let object = {};
2+
/** @type {{ bar?: any }}*/
3+
let foo = $state({});
4+
let bar = {};
45
5-
state.object = object;
6+
foo.bar = bar;
67
7-
console.log(state.object === object); // false because of the $state proxy
8-
9-
console.log($state.is(state.object, object)); // true
8+
console.log(foo.bar === bar); // false because of the $state proxy
9+
console.log($state.is(foo.bar, bar)); // true
1010
</script>

0 commit comments

Comments
 (0)