-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: revert additional two-way-binding checks (#2508)
This reverts commit 8c080cf. This reverts #2477. Sadly, the idea didn't work out, as shown by two opened bug reports: - #2506: A type union can be narrowed on the input, but not on the way back out - #2494: A generic nested within a bound value is not properly resolved and not falling back to `any` (in #2477 we thought of the generic case, but only for when the generic is the whole value type, not when it's nested) For these reasons I don't see a way to properly implement #1392 at the moment.
- Loading branch information
1 parent
e74f1d7
commit 81019d9
Showing
14 changed files
with
14 additions
and
134 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
7 changes: 0 additions & 7 deletions
7
...est/plugins/typescript/features/diagnostics/fixtures/bindings-two-way-check/Legacy.svelte
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...test/plugins/typescript/features/diagnostics/fixtures/bindings-two-way-check/Runes.svelte
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...ugins/typescript/features/diagnostics/fixtures/bindings-two-way-check/RunesGeneric.svelte
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...ns/typescript/features/diagnostics/fixtures/bindings-two-way-check/expected_svelte_5.json
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
...t/plugins/typescript/features/diagnostics/fixtures/bindings-two-way-check/expectedv2.json
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...test/plugins/typescript/features/diagnostics/fixtures/bindings-two-way-check/input.svelte
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<script lang="ts"> | ||
import MyComponent from './ComponentB.svelte' | ||
let value: Date | ||
$: console.log('value:', value) | ||
<script> | ||
export let value; | ||
</script> | ||
|
||
<MyComponent bind:value /> | ||
|
||
{#if value} | ||
<input bind:value on:change /> | ||
{/if} |
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
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
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
4 changes: 2 additions & 2 deletions
4
packages/svelte2tsx/test/htmlx2jsx/samples/binding-bare/expected-svelte5.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
packages/svelte2tsx/test/htmlx2jsx/samples/binding/expected-svelte5.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/svelte2tsx/test/htmlx2jsx/samples/editing-binding/expected-svelte5.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.