mirror of https://github.com/sveltejs/svelte
parent
ed670ebdd2
commit
84e2dd3130
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { ...rest } = $props();
|
||||
</script>
|
||||
|
||||
{rest.count}
|
@ -0,0 +1,10 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
error:
|
||||
'Cannot use bind:count on this component because the property was not declared as bindable. To mark a property as bindable, use let `{ count } = $props.bindable()` within the component.',
|
||||
html: `0`
|
||||
});
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
import Counter from './Counter.svelte';
|
||||
|
||||
let count = $state(0);
|
||||
</script>
|
||||
|
||||
<Counter bind:count />
|
@ -1,7 +1,10 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
error:
|
||||
'ERR_SVELTE_NOT_BINDABLE: Cannot bind:count because the property was not declared as bindable. To mark a property as bindable, use let `{ count } = $props.bindable()` within the component.',
|
||||
'Cannot use bind:count on this component because the property was not declared as bindable. To mark a property as bindable, use let `{ count } = $props.bindable()` within the component.',
|
||||
html: `0`
|
||||
});
|
||||
|
Loading…
Reference in new issue