[PR #4185] [MERGED] docs: update handler and resolve types in SvelteKit integration #5241

Closed
opened 2026-03-13 12:15:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4185
Author: @Stadly
Created: 8/23/2025
Status: Merged
Merged: 8/24/2025
Merged by: @Kinfe123

Base: canaryHead: chore/sveltekit-types


📝 Commits (1)

  • d094735 Update handler and resolve types in SvelteKit integration

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 packages/better-auth/src/integrations/svelte-kit.ts (+4 -4)

📄 Description

Summary by cubic

Align SvelteKit integration types with actual runtime by specifying Response | Promise for handlers and using RequestEvent for resolve. Improves type safety and prevents incorrect usage.

  • Refactors
    • Set auth.handler to return Response | Promise.
    • Typed resolve as (event: RequestEvent) => Response | Promise.
    • Updated toSvelteKitHandler wrapper to match the new types.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4185 **Author:** [@Stadly](https://github.com/Stadly) **Created:** 8/23/2025 **Status:** ✅ Merged **Merged:** 8/24/2025 **Merged by:** [@Kinfe123](https://github.com/Kinfe123) **Base:** `canary` ← **Head:** `chore/sveltekit-types` --- ### 📝 Commits (1) - [`d094735`](https://github.com/better-auth/better-auth/commit/d0947355ff71ccc036a6839307580389fc93da50) Update handler and resolve types in SvelteKit integration ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/integrations/svelte-kit.ts` (+4 -4) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Align SvelteKit integration types with actual runtime by specifying Response | Promise<Response> for handlers and using RequestEvent for resolve. Improves type safety and prevents incorrect usage. - **Refactors** - Set auth.handler to return Response | Promise<Response>. - Typed resolve as (event: RequestEvent) => Response | Promise<Response>. - Updated toSvelteKitHandler wrapper to match the new types. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:15:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5241