Skip to content

Conversation

@quietbits
Copy link
Contributor

  • Migrated int128, int256, uint128, and uint256 files to TS.
  • Added tests for the above files.
  • Added local type declarations of @stellar/js-xdr and updated tsconfig to use them.

@quietbits quietbits linked an issue Feb 11, 2026 that may be closed by this pull request
5 tasks
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

Size Change: -137 B (0%)

Total Size: 3.51 MB

Filename Size Change
dist/stellar-base.js 2.59 MB -137 B (-0.01%)
ℹ️ View Unchanged
Filename Size
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

Migrates the first set of large integer number helpers under /numbers to TypeScript, adding local @stellar/js-xdr typings to unblock TS typechecking during the broader JS→TS transition.

Changes:

  • Converted int128, int256, uint128, uint256 implementations to typed TS signatures.
  • Added new Vitest unit tests covering constructors, boundaries, parsing, and conversions for the migrated types.
  • Added a local @stellar/js-xdr declaration package and updated tsconfig to load local typings via typeRoots.

Reviewed changes

Copilot reviewed 9 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
types/stellar__js-xdr/index.d.ts Adds local ambient typings for @stellar/js-xdr during migration.
tsconfig.base.json Configures typeRoots so the local typings directory is used by TS.
src/numbers/uint256.ts Adds TS annotations to the Uint256 wrapper.
src/numbers/uint128.ts Adds TS annotations to the Uint128 wrapper.
src/numbers/int256.ts Adds TS annotations to the Int256 wrapper.
src/numbers/int128.ts Adds TS annotations to the Int128 wrapper.
test/unit/numbers/uint256.test.ts Introduces Vitest coverage for Uint256 behavior.
test/unit/numbers/uint128.test.ts Introduces Vitest coverage for Uint128 behavior.
test/unit/numbers/int256.test.ts Introduces Vitest coverage for Int256 behavior.
test/unit/numbers/int128.test.ts Introduces Vitest coverage for Int128 behavior.
type_validation/numbers/uint256.d.ts Adds/updates emitted declaration for Uint256.
type_validation/numbers/uint128.d.ts Adds/updates emitted declaration for Uint128.
type_validation/numbers/int256.d.ts Adds/updates emitted declaration for Int256.
type_validation/numbers/int128.d.ts Adds/updates emitted declaration for Int128.
Comments suppressed due to low confidence (1)

src/numbers/int128.ts:8

  • JSDoc tag spacing is inconsistent with the other migrated number types (@param args ...). Consider normalizing this to @param args ... for consistency.

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

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

Copilot reviewed 9 out of 14 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/numbers/int128.ts:8

  • JSDoc @param tag has an extra space (@param args) which is inconsistent with the other migrated number classes in this PR. Consider normalizing to @param args to keep generated docs consistent.

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

@quietbits quietbits requested a review from Ryang-21 February 11, 2026 22:29
Copy link
Contributor

@Ryang-21 Ryang-21 left a comment

Choose a reason for hiding this comment

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

Nice find on the typeRoots field

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.

Migrate /numbers files to TS

2 participants