Skip to content
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

$$Props and missing children prop #2218

Open
dummdidumm opened this issue Nov 26, 2023 · 2 comments
Open

$$Props and missing children prop #2218

dummdidumm opened this issue Nov 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@dummdidumm
Copy link
Member

Describe the bug

When using $$Props, children isn't likely set on it in Svelte libraries compiled with version 5. We need to add it in that case.

Reproduction

https://discord.com/channels/457912077277855764/1153350350158450758/1178260814239629353

Expected behaviour

No type error

System Info

  • OS: [e.g. Windows]
  • IDE: [e.g. VSCode, Atom]

Which package is the issue about?

svelte2tsx

Additional Information, eg. Screenshots

No response

@dummdidumm dummdidumm added the bug Something isn't working label Nov 26, 2023
@amit13k
Copy link

amit13k commented Nov 26, 2023

No such errors are displayed after downgrading svelte vscode extension to v108.0.0.

@dummdidumm
Copy link
Member Author

Actually, the better fix is probably to adjust the typings in Svelte 5 to include children as a snippet prop on the attributes

dummdidumm added a commit to sveltejs/svelte that referenced this issue Nov 28, 2023
Add this here so that libraries doing `props$<HTMLButtonAttributes>()` don't need a separate interface
fixes #sveltejs/language-tools#2218
Rich-Harris pushed a commit to sveltejs/svelte that referenced this issue Nov 28, 2023
* fix: add children to element typings

Add this here so that libraries doing `props$<HTMLButtonAttributes>()` don't need a separate interface
fixes #sveltejs/language-tools#2218

* typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants