Skip to content

fix: resolve 7 TypeScript compilation errors blocking tsc --noEmit #49

Description

@Shantanu112-bd

Problem

Running npx tsc --noEmit produces 7 TypeScript errors
across agent.ts, examples/, and lib/buildTransaction.ts.
This means the package cannot be safely type-checked,
breaking IDE integration and CI pipelines.

Errors

  • agent.ts: invalid Server import from @stellar/stellar-sdk
  • agent.ts: TS2367 non-overlapping string comparisons
  • agent.ts: untyped balance inference
  • examples/: implicit any in catch blocks
  • lib/buildTransaction.ts: string equivalence type errors

Fix

  • Correct Horizon.Server import pattern
  • Add Network type union, fix comparisons
  • Explicit types on balance variables
  • Typed catch blocks in examples/
  • Type guards in buildTransaction.ts

I have a working fix with 0 tsc errors and all 28 tests
still passing. Happy to open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions