Skip to content

Exported types for nested param classes#2712

Merged
prathmesh-stripe merged 1 commit into
masterfrom
prathmesh/v2accountconfiguration
May 12, 2026
Merged

Exported types for nested param classes#2712
prathmesh-stripe merged 1 commit into
masterfrom
prathmesh/v2accountconfiguration

Conversation

@prathmesh-stripe

@prathmesh-stripe prathmesh-stripe commented May 12, 2026

Copy link
Copy Markdown
Contributor

Why?

When param types are re-exported using export type X = Namespace.X, only the type itself is exposed — any nested namespaces within that type (e.g. AccountCreateParams.Configuration) are lost. This means users can't reference nested param interfaces like Stripe.V2.Core.AccountCreateParams.Configuration even though the top-level AccountCreateParams is accessible.

What?

  • Changed all export type X = Namespace.X declarations in resource index files to export import X = Namespace.X, which re-exports the full namespace (including nested interfaces/namespaces) rather than just the type alias
  • Added a type test verifying Stripe.V2.Core.AccountCreateParams.Configuration is accessible which wasn't accessible before this.

See Also

Changelog

  • Types inside nested param class namespaces(e.g. Stripe.V2.Core.AccountCreateParams.Configuration, Stripe.V2.Core.AccountCreateParams.Dashboard) are now accessible.

@prathmesh-stripe prathmesh-stripe changed the title Exported namespaces for nested param classes Types for nested param classes are now exported May 12, 2026
@prathmesh-stripe prathmesh-stripe changed the title Types for nested param classes are now exported Exported types for nested param classes May 12, 2026
@prathmesh-stripe prathmesh-stripe marked this pull request as ready for review May 12, 2026 13:47
@prathmesh-stripe prathmesh-stripe requested a review from a team as a code owner May 12, 2026 13:47
@prathmesh-stripe prathmesh-stripe requested review from jar-stripe and xavdid and removed request for a team May 12, 2026 13:47

@xavdid xavdid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@prathmesh-stripe prathmesh-stripe merged commit 0a91ffd into master May 12, 2026
11 checks passed
@prathmesh-stripe prathmesh-stripe deleted the prathmesh/v2accountconfiguration branch May 12, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants