-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
adapter types #5386
adapter types #5386
Conversation
🦋 Changeset detectedLatest commit: 76b60a7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
Netlify and Vercel are actually a little tricky, since you might use |
Idea: have two ambient type definitions which are in separate files and importable through |
The challenge will be that one day we want to allow some endpoints (or even handlers) to run on the edge and others to run in a lambda, depending on their data requirements. Not sure how to reconcile that with a global |
Oh yeah that sounds impossible to solve correctly with one global type definition. We kind of have the same problem with |
Perhaps it's an argument for normalizing/abstracting |
In #5081, we ask people to manually update their
src/app.d.ts
to include the relevant platform types for their adapter. It's confusing and brittle (people who already haveadapter-cloudflare
installed won't seeenv.caches
magically appear, even though it's now there).In an ideal world we'd somehow magically inject these types, but failing that, asking people to add a triple-slash directive is probably reasonable.
Marking as draft because we should do this for all adapters.
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. All changesets should bepatch
until SvelteKit 1.0