-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: support default parameter in snippet block #2385
Conversation
Still need to find a way to infer the type from the default value. |
What do you mean by "infer the type from the default value"? |
We should add them everywhere we can Related sveltejs/language-tools#2385
Because of the type annotation, the type for the parameter would be any instead of inferring from the default value like functions usually do.
Sure. We can deal with this type of problem later. I can't really think of a way to let ts infer the type now. |
* fix: append start/end info to more tags We should add them everywhere we can Related sveltejs/language-tools#2385 * changeset --------- Co-authored-by: Rich Harris <[email protected]>
I pushed a fix to Svelte to make the default parameter appear correctly. What's left is the default type inference problem. We could do something like: check if the default parameter references a variable outside the snippet code
|
Closing in favor of #2449 |
#2384