[PR #7701] [MERGED] fix(admin): change list type from never[] to UserWithRole[] #15747

Closed
opened 2026-04-13 10:12:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: canaryHead: patch-5


📝 Commits (1)

  • 8816759 fix(admin): change list type from never[] to UserWithRole[]

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/admin/routes.ts (+1 -1)

📄 Description

Prevents type inference issues and ensures the list correctly represents users with roles instead of collapsing to never.


Summary by cubic

Fixes TypeScript typing in admin listUsers by returning an empty array as UserWithRole[] instead of never[]. This prevents inference issues and keeps the response type consistent for consumers.

Written for commit 881675901a. 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/7701 **Author:** [@LovelessCodes](https://github.com/LovelessCodes) **Created:** 1/30/2026 **Status:** ✅ Merged **Merged:** 1/30/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `patch-5` --- ### 📝 Commits (1) - [`8816759`](https://github.com/better-auth/better-auth/commit/881675901ad928384b3487daa48aaf7cc9114bd0) fix(admin): change list type from never[] to UserWithRole[] ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/admin/routes.ts` (+1 -1) </details> ### 📄 Description Prevents type inference issues and ensures the list correctly represents users with roles instead of collapsing to never. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes TypeScript typing in admin listUsers by returning an empty array as UserWithRole[] instead of never[]. This prevents inference issues and keeps the response type consistent for consumers. <sup>Written for commit 881675901ad928384b3487daa48aaf7cc9114bd0. 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-04-13 10:12:21 -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#15747