I encountered an issue where I am receiving the error message "Cannot use a declaration in a single-statement context" while using $: syntax in a script with lang="ts" within my +page.svelte file. Additionally, when I check the version control system (VCS), it mentions "'A label is not allowed here." on the $.
<script lang="ts">
export let data;
$: let payload = data.payload
</script>
The $: syntax for reactivity is documented officially in Svelte and should ideally be functioning without any errors.