-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only emit binding_property_non_reactive warning in runes mode (#…
- Loading branch information
1 parent
fd5cfd7
commit 73ac4fe
Showing
4 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: only emit binding_property_non_reactive warning in runes mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/svelte/tests/runtime-legacy/samples/binding-member-expression-no-warning/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { flushSync } from 'svelte'; | ||
import { ok, test } from '../../test'; | ||
|
||
export default test({ | ||
compileOptions: { | ||
dev: true | ||
}, | ||
|
||
test({ assert, target, window }) { | ||
assert.htmlEqual(target.innerHTML, `<input><p>hello</p>`); | ||
|
||
const input = target.querySelector('input'); | ||
ok(input); | ||
|
||
input.value = 'goodbye'; | ||
input.dispatchEvent(new window.Event('input')); | ||
|
||
flushSync(); | ||
assert.htmlEqual(target.innerHTML, `<input><p>goodbye</p>`); | ||
}, | ||
|
||
warnings: [] | ||
}); |
6 changes: 6 additions & 0 deletions
6
...ages/svelte/tests/runtime-legacy/samples/binding-member-expression-no-warning/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<script> | ||
let object = { value: 'hello' }; | ||
</script> | ||
|
||
<input bind:value={object.value} /> | ||
<p>{object.value}</p> |