[PR #6643] [MERGED] chore: fix type inference for future TS compatibility #15047

Closed
opened 2026-04-13 09:47:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6643
Author: @Azzerty23
Created: 12/9/2025
Status: Merged
Merged: 12/10/2025
Merged by: @himself65

Base: canaryHead: fix/organization-plugin-type-inference


📝 Commits (1)

  • 060f687 fix(organization): wrap options type with NoInfer to fix inference for future TS compatibility

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/organization/organization.ts (+5 -5)

📄 Description

Fixes return type inference issue (in organization plugin) with TS 6.x — for future compatibility.

Ref: https://github.com/microsoft/typescript-go/issues/2162


Summary by cubic

Fix return type inference in the organization plugin by wrapping the options generic with NoInfer, ensuring compatibility with upcoming TypeScript 6.x.

  • Bug Fixes
    • Replaced options: O with options: NoInfer across all overloads in organization.ts to stabilize inference.
    • Type-only change; no runtime impact.

Written for commit 060f687fba. Summary will update automatically on new commits.


🔄 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/6643 **Author:** [@Azzerty23](https://github.com/Azzerty23) **Created:** 12/9/2025 **Status:** ✅ Merged **Merged:** 12/10/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/organization-plugin-type-inference` --- ### 📝 Commits (1) - [`060f687`](https://github.com/better-auth/better-auth/commit/060f687fbaf235869e8ae40ed95cc89b3aaa13e0) fix(organization): wrap options type with NoInfer to fix inference for future TS compatibility ### 📊 Changes **1 file changed** (+5 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+5 -5) </details> ### 📄 Description Fixes return type inference issue (in organization plugin) with TS 6.x — for future compatibility. Ref: https://github.com/microsoft/typescript-go/issues/2162 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fix return type inference in the organization plugin by wrapping the options generic with NoInfer, ensuring compatibility with upcoming TypeScript 6.x. - **Bug Fixes** - Replaced options: O with options: NoInfer<O> across all overloads in organization.ts to stabilize inference. - Type-only change; no runtime impact. <sup>Written for commit 060f687fbaf235869e8ae40ed95cc89b3aaa13e0. Summary will update automatically on new commits.</sup> <!-- 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-13 09:47:43 -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#15047