Skip to content

Support TypeScript 5.2 using Declarations and Explicit Resource Management in.svelte files  #14282

@TimoWilhelm

Description

@TimoWilhelm

Describe the problem

TypeScript 5.2 adds support for the upcoming Explicit Resource Management feature in ECMAScript.
However, using that syntax in .svelte files with <script lang="ts"> currently throws a svelte(js_parse_error).

Screenshot 2024-11-12 112324

As a workaround, the using declarations can be used in a neighboring .ts file that is imported by the .svelte file.

Describe the proposed solution

It would be nice if using declarations would be supported directly in .svelte files using lang="ts".

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions