mirror of https://github.com/sveltejs/svelte
parent
98ae05b569
commit
e7d510a534
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: improve prop binding warning validation for stores
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { count = $bindable() } = $props();
|
||||
</script>
|
||||
|
||||
<input type="number" bind:value={count} />
|
||||
@ -0,0 +1,11 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
mode: ['client'],
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
async test({ warnings, assert }) {
|
||||
assert.deepEqual(warnings, []);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import { writable } from 'svelte/store';
|
||||
import Child from './Child.svelte';
|
||||
|
||||
let stuff = writable({ count: 0 });
|
||||
</script>
|
||||
|
||||
<Child bind:count={$stuff.count} />
|
||||
<p>{$stuff.count}</p>
|
||||
Loading…
Reference in new issue