Skip to content

Semantic token highlights entire $props() type annotation #2374

@max-got

Description

@max-got

Describe the bug

Just a quick little syntax highlighting bug in a script tag:
Template literals aren't properly highlighted in $props() type declaration:

initial_svelte_vs

As shown above, can be worked around with a separate type

Reproduction

<script lang="ts">
	type Icon = `i-ph-${string}`;
	let { icon, iconType }: { icon: Icon; iconType: `i-ph-${string}` } = $props();
</script>

Expected behaviour

fixed_svelte_vs

System Info

  • IDE: VSCode
  • Svelte for VS Code v108.4.1

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions