[PR #1661] [CLOSED] fix: type issues with prettify ts util #20830

Closed
opened 2026-04-15 19:57:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1661
Author: @focux
Created: 3/3/2025
Status: Closed

Base: mainHead: fix-prettify-util


📝 Commits (1)

📊 Changes

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

View changed files

📝 packages/better-auth/src/types/helper.ts (+1 -1)

📄 Description

Description

This PR addresses type issues that appeared after upgrading to version 1.2.0. The issue was related to the Prettify type utility which was causing type errors on the client side.

Fixes #1660 and #1637

Changes

  • Removed the previous implementation of Prettify that was using Omit<T, never>
  • Added a new implementation that sets Prettify = PreserveJSDoc, maintaining type functionality while resolving the client-side type errors
  • Note that the PreserveJSDoc utility already handles prettifying TypeScript types while also preserving JSDoc comments

Testing

Verified that client-side types work correctly after this change while maintaining the same functionality.


🔄 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/1661 **Author:** [@focux](https://github.com/focux) **Created:** 3/3/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-prettify-util` --- ### 📝 Commits (1) - [`16a8514`](https://github.com/better-auth/better-auth/commit/16a851483d21a1f1e0772b9c9a0504eb529a7ae8) fix: prettify utils ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/helper.ts` (+1 -1) </details> ### 📄 Description ## Description This PR addresses type issues that appeared after upgrading to version 1.2.0. The issue was related to the Prettify<T> type utility which was causing type errors on the client side. Fixes #1660 and #1637 ## Changes - Removed the previous implementation of Prettify<T> that was using Omit<T, never> - Added a new implementation that sets Prettify<T> = PreserveJSDoc<T>, maintaining type functionality while resolving the client-side type errors - Note that the PreserveJSDoc utility already handles prettifying TypeScript types while also preserving JSDoc comments ## Testing Verified that client-side types work correctly after this change while maintaining the same functionality. --- <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 19:57:33 -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#20830