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

fix: include named exports in svelte 5 type #2528

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

paoloricciuti
Copy link
Member

@paoloricciuti paoloricciuti commented Oct 9, 2024

This should fix sveltejs/svelte#13508

I'm missing writing and fixing the tests but i'm pushing this already so that it can be validated. I'll fix tests and write new later.

EDIT: while working on this i noticed that even if a component had <svelte:options runes /> it was still exporting like if it was not in rune mode. A bit of digging led me to the discovery that that option was never read. I added this but i don't know if i misunderstood something.

Also i write some new test and despite the fact that it's just for runes is still requiring an expectedv2 file which seems a bit weird...is there some configuration i need to set to prevent this?

@dummdidumm
Copy link
Member

Code looks good 👍 you can add .v5 to the end of the test folder, then it will only be run in Svelte 5, and then only expectedv2 will be needed

@paoloricciuti
Copy link
Member Author

Code looks good 👍 you can add .v5 to the end of the test folder, then it will only be run in Svelte 5, and then only expectedv2 will be needed

Oh gotcha...will update then.

P.s. I know this repo is less contributor friendly to begin with but I think we should try to write those things somewhere 😌

@dummdidumm
Copy link
Member

Totally agree, a contribution guide is needed

@paoloricciuti
Copy link
Member Author

Totally agree, a contribution guide is needed

I'll try to write down something as soon as i can but i will probably need a lot of feedback since as you've seen i'm missing some info 😄

@dummdidumm dummdidumm merged commit b12afd1 into sveltejs:master Oct 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5: ReturnType<typeof Component> doesn't include exported props type
2 participants