Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is there a way to comment / document exported snippets?#16437

Unanswered
pmalacho-mit asked this question inQ&A
Discussion options

Hello! I'm a total svelte 5 convert, and have also been loving snippets and am using them a great deal. I'm wondering if there's a way to comment "top-level" exported snippets that I expect other areas of my app to consume. For example:

Component.svelte

<scriptlang="ts"module>export {reusable };</script>{#snippetreusable()}   ...{/snippet}

My attempts to add comments to the export aren't picked up by the language service, nor am I able to assign the snippet to a new variable + comment & export that (I get aBlock-scoped variable 'reusable' used before its declaration. typescript error).

I think it'd be ideal to be able to comment snippets in the markup similar to how components are done, e.g.

<!-- @snippet ...documentation... -->{#snippetreusable()}   ...{/snippet}

Thanks!

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@pmalacho-mit

[8]ページ先頭

©2009-2025 Movatter.jp