You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i thought of moving all the comments related to props above the props but that could be just confusing. But what if we use another approach.
This also works in JSDoc
<script>
/** * @typedef{Object}Props * @property{string}comment - My wonderful comment * @property{string}another_comment - My wonderful other comment*//**@type{Props}*/let { comment, another_comment } =$props();
</script>
and we could even move the lines comments there (even tho it's not exactly right i would be less pissed to have a line comment in the JSDoc that have it lingering around the file)
Describe the bug
A common pattern if you are building a large application with svelte is to document you props with JSDoc or at least with comment.
Currently the migration script falls a bit short for this very common situation:
is converted into
And just like that all time spent into writing documentation for your props is trashed.
The situation is a bit worst if the comment is a line comment
is converted into this
i thought of moving all the comments related to props above the props but that could be just confusing. But what if we use another approach.
This also works in JSDoc
and we could even move the lines comments there (even tho it's not exactly right i would be less pissed to have a line comment in the JSDoc that have it lingering around the file)
Do you think is worth?
Reproduction
REPL
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: