[PR #2449] [CLOSED] chore: fix haveibeenpwned typescript issue and added inline docs #4324

Closed
opened 2026-03-13 11:41:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2449
Author: @NeoPrint3D
Created: 4/26/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 5fd981a chore: fix haveibeenpwned typescript issue and added inline docs

📊 Changes

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

View changed files

📝 packages/better-auth/src/plugins/haveibeenpwned/index.ts (+5 -1)

📄 Description

Fixed the issue where when a user has the haveIBeenPwned plugin it throws a typescript compilation error:

 error TS2742: The inferred type of 'auth' cannot be named without a reference to '../../node_modules/better-auth/dist/shared/better-auth.qzSbzJNO'. This is likely not portable. A type annotation is necessary.
export const auth = betterAuth(
                ~~~~~~~~~~~~~~~~

I fixed it by changing

From

import type { BetterAuthPlugin } from "../../types";

To

import type { BetterAuthPlugin } from "../../types/plugins";

More information about the issue: #2413


🔄 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/2449 **Author:** [@NeoPrint3D](https://github.com/NeoPrint3D) **Created:** 4/26/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`5fd981a`](https://github.com/better-auth/better-auth/commit/5fd981a784b92c69b6134b84ed73b06081477a21) chore: fix haveibeenpwned typescript issue and added inline docs ### 📊 Changes **1 file changed** (+5 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/plugins/haveibeenpwned/index.ts` (+5 -1) </details> ### 📄 Description ## Fixed the issue where when a user has the haveIBeenPwned plugin it throws a typescript compilation error: ```bash error TS2742: The inferred type of 'auth' cannot be named without a reference to '../../node_modules/better-auth/dist/shared/better-auth.qzSbzJNO'. This is likely not portable. A type annotation is necessary. ```` ```ts export const auth = betterAuth( ~~~~~~~~~~~~~~~~ ``` I fixed it by changing ### From ```ts import type { BetterAuthPlugin } from "../../types"; ``` ### To ```ts import type { BetterAuthPlugin } from "../../types/plugins"; ``` More information about the issue: #2413 --- <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 11:41:49 -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#4324