mirror of https://github.com/sveltejs/svelte
fix: warn when `$props` rune not called (#10655)
It's a warning because even when typing it out and knowing what to do you'll always be in a state where the validation kicks in, and it would be too distracting to always see a compiler error during that short time frame. closes #10374pull/10656/head
parent
77b1f2fe51
commit
6625c1e080
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: warn when `$props` rune not called
|
@ -0,0 +1,3 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({});
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let { a } = $props;
|
||||
</script>
|
@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"code": "invalid-props-declaration",
|
||||
"message": "Component properties are declared using $props() in runes mode. Did you forget to call the function?",
|
||||
"start": {
|
||||
"column": 5,
|
||||
"line": 2
|
||||
},
|
||||
"end": {
|
||||
"column": 19,
|
||||
"line": 2
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in new issue