-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: missing space when importing run as in migration (#13361)
* fix: missing space when importing run as in migration * chore: add test
- Loading branch information
1 parent
bc2d30c
commit c5fa0b4
Showing
3 changed files
with
37 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
packages/svelte/tests/migrate/samples/effects-with-alias-run/input.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,14 @@ | ||
<script> | ||
let count = 0; | ||
let run = true; | ||
$: console.log(count); | ||
$: if (count > 10 && run) { | ||
alert('too high') | ||
} | ||
$: { | ||
console.log('foo'); | ||
if (x) break $; | ||
console.log('bar'); | ||
} | ||
$: $count = 1; | ||
</script> |
22 changes: 22 additions & 0 deletions
22
packages/svelte/tests/migrate/samples/effects-with-alias-run/output.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,22 @@ | ||
<script> | ||
import { run as run_1 } from 'svelte/legacy'; | ||
let count = 0; | ||
let run = true; | ||
run_1(() => { | ||
console.log(count); | ||
}); | ||
run_1(() => { | ||
if (count > 10 && run) { | ||
alert('too high') | ||
} | ||
}); | ||
run_1(() => { | ||
console.log('foo'); | ||
if (x) return; | ||
console.log('bar'); | ||
}); | ||
run_1(() => { | ||
$count = 1; | ||
}); | ||
</script> |