add passing version

loosen-state-rune
Dominic Gannaway 6 months ago
parent b182a4181d
commit 0da2215cf2

@ -4,6 +4,7 @@ export default test({
error: { error: {
code: 'invalid-state-location', code: 'invalid-state-location',
message: message:
'$state() can only be used as a variable declaration initializer, a class field or if passed an object or array, can be used as an expression' '$state() can only be used as a variable declaration initializer, a class field or if passed an object or array, can be used as an expression',
position: [81, 90]
} }
}); });

@ -1,5 +1,9 @@
<script> <script>
function a() { function a() {
return $state({ a: 1 });
}
function b() {
return $state(1); return $state(1);
} }
</script> </script>

Loading…
Cancel
Save