Skip to content

Regenerate xdr type declarations#874

Merged
Ryang-21 merged 2 commits intomasterfrom
xdr-type-declarations
Feb 26, 2026
Merged

Regenerate xdr type declarations#874
Ryang-21 merged 2 commits intomasterfrom
xdr-type-declarations

Conversation

@Ryang-21
Copy link
Contributor

Why

The XDR type declarations were regenerated to incorporate changes made in dts-xdr for integer-discriminated unions. This change involved adding constructor type declarations to the integer-discriminated union classes so the Typescript compiler recognizes that this is possible.

What

  • types/curr.d.ts and types/next.d.ts now include constructors for integer-discriminated unions
  • Removes the static number methods for integer-discriminated union classes
  • Fixes duplicated return types on the value() method for some union classes

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Size Change: 0 B

Total Size: 3.52 MB

ℹ️ View Unchanged
Filename Size
dist/stellar-base.js 2.6 MB
dist/stellar-base.min.js 920 kB

compressed-size-action

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Regenerates the generated TypeScript XDR declaration files to reflect updated dts-xdr behavior for integer-discriminated unions, improving TypeScript’s ability to type-check union construction and simplifying several duplicated union return types.

Changes:

  • Add constructor overloads for integer-discriminated XDR union classes and remove static numeric factory methods.
  • Deduplicate/normalize several value() return types (e.g., removing repeated union members).
  • Update CHANGELOG.md to document the type-generation change (and a small wording tweak).

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
types/next.d.ts Regenerated XDR typings: int-discriminated unions now have constructors; removes static numeric factories; cleans up duplicated unions/returns.
types/curr.d.ts Same regeneration updates as types/next.d.ts, plus a few array type normalizations (e.g., Array<T>T[]).
CHANGELOG.md Adds an Unreleased “Fixed” entry describing the regenerated XDR union typing change.

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

@Ryang-21 Ryang-21 merged commit 00d2d94 into master Feb 26, 2026
8 checks passed
@Ryang-21 Ryang-21 deleted the xdr-type-declarations branch February 26, 2026 17:50
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