Skip to content

What's the best practise to type snippets automatically? #14521

Answered by brunnerh
CNSeniorious000 asked this question in Q&A
Discussion options

You must be logged in to vote

Well, the language tools could potentially generate types based on usage, so you could e.g. have something like:

const { otherProp, children }: { otherProp: string } & $Snippets = $props();

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@CNSeniorious000
Comment options

@brunnerh
Comment options

Answer selected by CNSeniorious000
@CNSeniorious000
Comment options

@brunnerh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants