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: correctly include ambient types from adapters #12088
base: main
Are you sure you want to change the base?
Conversation
…torage type import cannot coexist with it
🦋 Changeset detectedLatest commit: 595eb96 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Inclusion of the Svelte config was reverted in #11908 because it's a breaking change strictly speaking. Is it ok to hold off from doing this until 3.0? |
Oh whoops. I didn’t realise it was something we already tried to do before. Yeah, I think it’s fine to wait for 3.0 for this. It has an easy workaround (just include the types or reference the adapter in a declaration file). Maybe I can split the ambient declaration changes and the svelte config inclusion into separate PRs? |
part of closing #11731
While investigating #11731 , I found that the ambient types from adapters weren't showing up when I tried installing the cloudflare, vercel, and node adapters in a fresh project and tried to access the autocomplete on
event.platform
.This PR does the following:
* includes theEDIT: separated into #12090svelte.config.js
file in the generated tsconfig so that when the svelte.config.js file imports the adapter, the ambient types are included for the whole project.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits