-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: export private legacy ComponentType (#14256) #14257
fix: export private legacy ComponentType (#14256) #14257
Conversation
🦋 Changeset detectedLatest commit: c4c544b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
preview: https://svelte-dev-git-preview-svelte-14257-svelte.vercel.app/ this is an automated message |
|
This feels like the wrong fix to me, because it means people can now import |
17d8d1a
to
a8728f8
Compare
I've updated the PR to use a different approach, basically we declare a module |
Can we use 'legacy' rather than 'transitionary'? |
(my spellchecker doesn't even recognize the latter as a real word) |
I agree that transitionary is a bit weird 😅 |
It will definetely cause problems. But I suggest instead to not create a new module for it, rather export a type from |
I moved the type to |
looks good - add a changeset and we're good to merge 👍 |
Added a changeset 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint
The transitionary interface
ComponentType
not being exported from the*.svelte
module declaration causes issues when runningtsc
with"declaration": true
:error TS4082: Default export of the module has or is using private name 'ComponentType'.
Exporting the interface from the solves this problem in my reproduction (see: #14256)
Fixed Reproduction
holy smokes,
pkg.pr.new
is cool:Broken reproduction with svelte@5.1.9
↓
Fixed reproduction with svelte@https://pkg.pr.new/svelte@14257
Question:
sincepackages/svelte/src/ambient.d.ts
is included inpackages/svelte/types/index.d.ts
when building I wasn't sure if I should commit both files into this branch?the ci lint job told me what to do