Skip to content

Replace "any" return type in xdr-parser.ts with strict types #7

Description

@Code-Paragon

Problem

The parseSorobanResult function in src/utils/xdr-parser.ts currently returns any, which violates the CONTRIBUTING.md guideline to avoid any types and removes TS safety for downstream functions.

Expected behavior

The function returns a strongly typed union (e.g., string | number | boolean | Record<string, unknown>) based on what scValToNative can output, ensuring type safety.

Files to update

  • src/utils/xdr-parser.ts

Project relevance

This strictly adheres to the project's technical guidelines and ensures mathematical and state-reading operations remain type-safe.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • any return type is completely removed and replaced with a strict TypeScript union type
  • No TypeScript, lint, test, or build errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions