Skip to content

Add revoke sponsorship operation type literals#969

Open
chrisx9z wants to merge 1 commit into
stellar:masterfrom
chrisx9z:fix/revoke-sponsorship-operation-types
Open

Add revoke sponsorship operation type literals#969
chrisx9z wants to merge 1 commit into
stellar:masterfrom
chrisx9z:fix/revoke-sponsorship-operation-types

Conversation

@chrisx9z
Copy link
Copy Markdown

Summary

  • Adds TypeScript operation type literals for each revoke sponsorship subtype.
  • Updates revoke sponsorship operation interfaces to use their runtime operation.type names instead of the generic revokeSponsorship literal.
  • Adds dtslint expectations covering all revoke sponsorship subtype names returned through Operation.fromXDRObject.

Fixes #728.

Verification

  • corepack yarn dtslint --localTs node_modules/typescript/lib types/
  • node --check types/test.ts
  • git diff --check

Copilot AI review requested due to automatic review settings May 27, 2026 07:23
Comment: Aligns revoke sponsorship TypeScript operation types with runtime subtype names.
Copy link
Copy Markdown

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds more granular TypeScript operation type literals for the various “revoke * sponsorship” helpers, and exercises them via new type-level tests.

Changes:

  • Added distinct OperationType.* string literal types for each revoke-sponsorship helper
  • Updated revoke-sponsorship operation interfaces to use those more specific discriminant type values
  • Added type tests asserting Operation.fromXDRObject(...) returns operations with the new specific .type literals

Reviewed changes

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

File Description
types/test.ts Adds $ExpectType checks for the new revoke-sponsorship .type discriminants via fromXDRObject.
types/index.d.ts Introduces new OperationType members and updates revoke-sponsorship operation interfaces to use them as discriminants.

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

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.

Missing types in OperationType

2 participants