Skip to content

Tsm contract#919

Merged
Ryang-21 merged 3 commits intotypescript-migrationfrom
tsm-contract
Mar 10, 2026
Merged

Tsm contract#919
Ryang-21 merged 3 commits intotypescript-migrationfrom
tsm-contract

Conversation

@Ryang-21
Copy link
Contributor

@Ryang-21 Ryang-21 commented Mar 9, 2026

No description provided.

@Ryang-21 Ryang-21 requested a review from Copilot March 9, 2026 17:29
@Ryang-21 Ryang-21 linked an issue Mar 9, 2026 that may be closed by this pull request
5 tasks
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Size Change: -13 B (0%)

Total Size: 3.6 MB

Filename Size Change
dist/stellar-base.js 2.65 MB -13 B (0%)
ℹ️ View Unchanged
Filename Size
dist/stellar-base.min.js 945 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

This PR updates the Soroban Contract API to be more TypeScript/ESM-friendly and migrates its unit tests to Vitest, along with updating generated type validation output.

Changes:

  • Update src/contract.ts to use ESM-style .js import specifiers and add TypeScript typings.
  • Replace the Mocha contract_test.js with a Vitest TypeScript test suite contract.test.ts.
  • Add generated type_validation/contract.d.ts for the Contract class.

Reviewed changes

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

Show a summary per file
File Description
src/contract.ts Switch imports to .js specifiers and add TS types for constructor/state and call() return type.
test/unit/contract_test.js Removes the legacy Mocha unit tests for Contract.
test/unit/contract.test.ts Adds Vitest-based TypeScript tests for Contract behavior and XDR outputs.
type_validation/contract.d.ts Adds generated declaration output for type-validation of the Contract API.
types/curr.d.ts Changes the Operation import path used by the generated curr XDR typings.

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

@Ryang-21 Ryang-21 requested a review from quietbits March 9, 2026 17:44
@Ryang-21 Ryang-21 merged commit dd07d8d into typescript-migration Mar 10, 2026
10 checks passed
@Ryang-21 Ryang-21 deleted the tsm-contract branch March 10, 2026 05:33
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 contract.js file to TS

3 participants