[PR #4691] [MERGED] refactor: remove unused generics #22434

Closed
opened 2026-04-15 21:02:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4691
Author: @himself65
Created: 9/16/2025
Status: Merged
Merged: 9/16/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/15/type


📝 Commits (1)

  • 292ce98 refactor: remove unused generics

📊 Changes

2 files changed (+11 additions, -9 deletions)

View changed files

📝 packages/better-auth/src/api/index.ts (+6 -6)
📝 packages/better-auth/src/auth.ts (+5 -3)

📄 Description

Summary by cubic

Simplified Better Auth type signatures by removing unused generics for clearer APIs and better type inference. No runtime behavior changes.

  • Refactors
    • getEndpoints: removed generic C; accept AuthContext directly.
    • router: replaced generic C with AuthContext param.
    • betterAuth: dropped redundant casts; pass options and context directly to init/getEndpoints.

🔄 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/4691 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/16/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/15/type` --- ### 📝 Commits (1) - [`292ce98`](https://github.com/better-auth/better-auth/commit/292ce983396a498b02c91d28c68b0b6f021eef0e) refactor: remove unused generics ### 📊 Changes **2 files changed** (+11 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/index.ts` (+6 -6) 📝 `packages/better-auth/src/auth.ts` (+5 -3) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Simplified Better Auth type signatures by removing unused generics for clearer APIs and better type inference. No runtime behavior changes. - **Refactors** - getEndpoints: removed generic C; accept AuthContext directly. - router: replaced generic C with AuthContext param. - betterAuth: dropped redundant casts; pass options and context directly to init/getEndpoints. <!-- 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-04-15 21:02:46 -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#22434