Skip to content

Possibility of writing snippets in .svelte.ts files #12713

Open
@webJose

Description

@webJose

Describe the problem

AFAIK, writing snippets outside of Svelte component files is not possible. However, unit testing would greatly benefit from being able to define snippets in .svelte.ts files. Right now, we either create a helper component for the test, or use createRawSnippet API.

Describe the proposed solution

Be capable of writing snippets in codefiles anywhere (top level, inside function bodies, etc.), as if they were functions or similar.

Importance

nice to have

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