mirror of https://github.com/sveltejs/svelte
feat: add warning when using $bindable runes without calling it (#11181)
* feat: add warning when using `$bindable` rune without calling it * --amendpull/11201/head
parent
777527b5a3
commit
1510c13113
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
feat: add warning when using `$bindable` rune without calling it
|
@ -0,0 +1,3 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({});
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let { a = $bindable } = $props();
|
||||
</script>
|
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "invalid-bindable-declaration",
|
||||
"message": "Bindable component properties are declared using $bindable() in runes mode. Did you forget to call the function?",
|
||||
"start": {
|
||||
"column": 7,
|
||||
"line": 2
|
||||
},
|
||||
"end": {
|
||||
"column": 20,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in new issue