mirror of https://github.com/sveltejs/svelte
parent
37f249350c
commit
ede1edd314
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: emit useful error on invalid binding to derived state
|
@ -0,0 +1,8 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'invalid-derived-binding',
|
||||||
|
message: 'Invalid binding to derived state'
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
let a = $state(0);
|
||||||
|
let b = $derived({ a });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<input type="number" bind:value={b} />
|
Loading…
Reference in new issue