[PR #5654] fix: add undefined type for optional property types #14390

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

Original Pull Request: https://github.com/better-auth/better-auth/pull/5654

State: closed
Merged: Yes


use ast-grep to replace all types


Summary by cubic

Explicitly added undefined to all optional properties and parameters across the codebase to align with TypeScript’s exactOptionalPropertyTypes and strict settings. Fixes type errors for consumers without changing runtime behavior.

  • Bug Fixes
    • Added | undefined to optional fields in adapters, client APIs, plugins, and tests.
    • Standardized function signatures (e.g., rate limiter, JWT, OIDC, API key, cookies) to accept undefined where optional.
    • Improved generics and unions for clearer output/where/select transforms and client hooks.
    • Updated tests to reflect new typings.
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5654 **State:** closed **Merged:** Yes --- use `ast-grep` to replace all types <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Explicitly added undefined to all optional properties and parameters across the codebase to align with TypeScript’s exactOptionalPropertyTypes and strict settings. Fixes type errors for consumers without changing runtime behavior. - **Bug Fixes** - Added | undefined to optional fields in adapters, client APIs, plugins, and tests. - Standardized function signatures (e.g., rate limiter, JWT, OIDC, API key, cookies) to accept undefined where optional. - Improved generics and unions for clearer output/where/select transforms and client hooks. - Updated tests to reflect new typings. <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:27:08 -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#14390