Skip to content

Adds shared OtherString type alias to better annotate non-exhaustive enums#2786

Open
jar-stripe wants to merge 2 commits into
masterfrom
jar/open-enum-generators
Open

Adds shared OtherString type alias to better annotate non-exhaustive enums#2786
jar-stripe wants to merge 2 commits into
masterfrom
jar/open-enum-generators

Conversation

@jar-stripe

@jar-stripe jar-stripe commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Why?

We want to better support "open" enums in our SDKs to make it more clear to users which enums should be handled exhaustively and which should not. Open enums can have values added in non-breaking (minor) releases.

What?

  • adds shared OtherString type alias. this will be appended to union types that are "open" meaning they are not exhaustive/can be added to added to in non-breaking releases

See Also

Changelog

  • Adds OtherString type to support better annotations of enum types that are not exhaustive.

Copilot AI review requested due to automatic review settings July 15, 2026 23:30
@jar-stripe jar-stripe requested a review from a team as a code owner July 15, 2026 23:30
@jar-stripe jar-stripe requested review from justiny-stripe and removed request for a team July 15, 2026 23:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a shared OtherString type alias to be used in generated/public TypeScript types when representing “open” (non-exhaustive) string-union enums.

Changes:

  • Introduces OtherString type alias in src/shared.ts for use at the end of open string unions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/shared.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jar-stripe jar-stripe requested a review from xavdid July 15, 2026 23:39
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.

3 participants