mirror of https://github.com/sveltejs/svelte
fix: handle ts expressions when dealing with runes (#9681)
* fix: handle ts expressions when dealing with runes related to #9639 * docs, more tests * simplify --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/9692/head
parent
a31b2e1b8e
commit
aabab263ee
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: handle ts expressions when dealing with runes
|
@ -0,0 +1,5 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: '1 2'
|
||||||
|
});
|
@ -0,0 +1,6 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
let count = $state(1) as number;
|
||||||
|
let double = $derived(count as number * 2) as number;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{count as number} {double as number}
|
@ -0,0 +1,5 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: '1 2'
|
||||||
|
});
|
@ -0,0 +1,6 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
let count = $state(1)!;
|
||||||
|
let double = $derived(count! * 2)!;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{count!} {double!}
|
Loading…
Reference in new issue