svelte
svelte copied to clipboard
docs improvements
Describe the problem
implement suggestions from #ambassadors
Describe the proposed solution
- untrack
- how to use interfaces with $props
- how to type a component (ReturnType<typeof Component>)
- links between tutorial and docs
Importance
nice to have
I would add "how to type and forward props to html elements", probably under the $props interface thing.
Don't know if this has been done or where to even mention this or if it has been mentioned.
In the docs, can we mention the "docstring/jsdoc/sveltedoc" feature:
<!--@component
This component can do things
-->
<script>
// svelte code
</script>
<div>I can do things</div>
Seems like a best kept secret.
I just found https://github.com/sveltejs/svelte.dev/issues/747, which also mentions a lot of these issues