[PR #7429] [MERGED] test(organization): reduce any type #7306

Closed
opened 2026-03-13 13:31:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7429
Author: @himself65
Created: 1/16/2026
Status: Merged
Merged: 1/16/2026
Merged by: @himself65

Base: canaryHead: himself65/2026/01/16/reduce-any


📝 Commits (1)

  • f8dffd0 test(organization): reduce any type

📊 Changes

1 file changed (+10 additions, -16 deletions)

View changed files

📝 packages/better-auth/src/plugins/organization/organization.test.ts (+10 -16)

📄 Description

Summary by cubic

Tightened TypeScript types in organization tests by removing any casts and improving type assertions. No runtime behavior changes.

  • Refactors
    • Replaced any-based session access with optional chaining in assertions.
    • Removed any in callbacks; rely on inferred types.
    • Switched expectTypeOf to toMatchTypeOf and removed placeholder casts.
    • Made global.window stubs type-safe using Window & typeof globalThis.

Written for commit f8dffd0a86. Summary will update 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/7429 **Author:** [@himself65](https://github.com/himself65) **Created:** 1/16/2026 **Status:** ✅ Merged **Merged:** 1/16/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2026/01/16/reduce-any` --- ### 📝 Commits (1) - [`f8dffd0`](https://github.com/better-auth/better-auth/commit/f8dffd0a861b6922af2c3e68ab72727a9dbf119b) test(organization): reduce `any` type ### 📊 Changes **1 file changed** (+10 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+10 -16) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Tightened TypeScript types in organization tests by removing any casts and improving type assertions. No runtime behavior changes. - **Refactors** - Replaced any-based session access with optional chaining in assertions. - Removed any in callbacks; rely on inferred types. - Switched expectTypeOf to toMatchTypeOf and removed placeholder casts. - Made global.window stubs type-safe using Window & typeof globalThis. <sup>Written for commit f8dffd0a861b6922af2c3e68ab72727a9dbf119b. Summary will update 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-03-13 13:31:27 -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#7306