[PR #6220] [MERGED] chore: export SubscriptionOptions type #6526

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6220
Author: @ceolinwill
Created: 11/22/2025
Status: Merged
Merged: 11/22/2025
Merged by: @himself65

Base: canaryHead: feat/export-subscription-options


📝 Commits (1)

  • 5a932fe feat: export SubscriptionOptions type

📊 Changes

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

View changed files

📝 packages/stripe/src/index.ts (+1 -1)

📄 Description

Exporting the SubscriptionOptions type makes it possible to reuse the getCheckoutSessionParams function in other files without manually extracting its type.
Otherwise, consumers need to derive the type through nested utility types like:

type SubscriptionConfig = Extract<
  NonNullable<Parameters<typeof stripe>[0]["subscription"]>,
  { enabled: true }
>;

type GetCheckoutSessionParamsFn = NonNullable<
  SubscriptionConfig["getCheckoutSessionParams"]
>;

By exporting the type directly, we avoid this boilerplate and keep the integration simpler.


Summary by cubic

Exported the SubscriptionOptions type from the Stripe package to make it easy to import and reuse in other files. This simplifies using getCheckoutSessionParams and removes nested utility type extraction.

Written for commit 5a932fe7f5. Summary will update automatically 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/6220 **Author:** [@ceolinwill](https://github.com/ceolinwill) **Created:** 11/22/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `feat/export-subscription-options` --- ### 📝 Commits (1) - [`5a932fe`](https://github.com/better-auth/better-auth/commit/5a932fe7f598e305191dd49329df89952a93ea71) feat: export SubscriptionOptions type ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/index.ts` (+1 -1) </details> ### 📄 Description Exporting the `SubscriptionOptions` type makes it possible to reuse the `getCheckoutSessionParams` function in other files without manually extracting its type. Otherwise, consumers need to derive the type through nested utility types like: ```ts type SubscriptionConfig = Extract< NonNullable<Parameters<typeof stripe>[0]["subscription"]>, { enabled: true } >; type GetCheckoutSessionParamsFn = NonNullable< SubscriptionConfig["getCheckoutSessionParams"] >; ``` By exporting the type directly, we avoid this boilerplate and keep the integration simpler. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Exported the SubscriptionOptions type from the Stripe package to make it easy to import and reuse in other files. This simplifies using getCheckoutSessionParams and removes nested utility type extraction. <sup>Written for commit 5a932fe7f598e305191dd49329df89952a93ea71. Summary will update automatically 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:02:13 -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#6526