How to Typing snippets
with JSDoc in javascript ?
#15071
Answered
by
brunnerh
Fd929c2CE5fA
asked this question in
Q&A
-
The documentation gives examples for |
Beta Was this translation helpful? Give feedback.
Answered by
brunnerh
Jan 21, 2025
Replies: 1 comment
-
Typing the props, e.g: <script>
/** @import { Snippet } from 'svelte' */;
/**
* @type {{
* snippet: Snippet<[number]>
* }}
*/
const { snippet } = $props();
</script> Typing snippet args in the template: {#snippet test(/** @type {number} */ arg)}
...
{/snippet} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Fd929c2CE5fA
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typing the props, e.g:
Typing snippet args in the template: