TS Bindings: Default exports in addition to exporting namespaces

Open
#1,153 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

The issue does not name files, tests, or an entry point. Start by locating the code that generates the TypeScript contract library, then inspect the generated namespace exports. Done means generated bindings support the shown default-import form while retaining namespace exports, with coverage for both import styles.

Written by the indexing model from the issue text.

Description

cli enhancement

Could be helpful to include default export in the generated library.

This would allow users to do:

import HelloContract from "bindings/hello-soroban-client";
import IncrementContract from "bindings/incrementor-client";

Instead of

import * as HelloContract from "bindings/hello-soroban-client";
import * as IncrementContract from "bindings/incrementor-client";

Useful when dealing with multiple contract namespaces in one file

Dominant language
Rust
Stars
123
Forks
141
Avg merge
2d 21h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/stellar-cli

All issues in stellar/stellar-cli

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.