add passing version

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

@ -4,6 +4,7 @@ export default test({
error: {
code: 'invalid-state-location',
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>
function a() {
return $state({ a: 1 });
}
function b() {
return $state(1);
}
</script>

Loading…
Cancel
Save