archethic-foundation / archethic-foundation/libjs

Improve `ArchethicWalletClient` typing

Open
#208 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
19
Forks
17
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem?

_No response_

### Describe the solution you'd like

RPC method callbacks are not rigorously typed.

For example, `onAccountUpdate(accountName: string, listener: Function): PromiseLike | undefined` should specify `listener` parameter type.

### Additional context

_No response_

### Epic

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the ArchethicWalletClient entry point and inspect the RPC method callback declarations, beginning with onAccountUpdate. Identify the parameter type expected by each listener instead of the generic Function type, then verify that the client’s TypeScript type checks pass.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.