CodeChain-io / CodeChain-io/codechain-sdk-js
Change all of the SDK functions to arrow function
未關閉
enhancement
good first issue
- 主要語言
- TypeScript
- 星號
- 26
- 分支
- 14
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Currently, the below example doesn't work
```
let sdk = new SDK(...);
let { getBlock, ... } = sdk.rpc.chain;
getBlock("0x123..").then(...)
```
Because of the function context.
Changing all the functions to the arrow function is one of the solutions.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從透過 sdk.rpc.chain 暴露的 SDK 函式開始,尤其是 getBlock,並重現 issue 中的 detached-call 範例。檢查目前 SDK 如何保留函式內容,然後驗證將 getBlock 解構後直接呼叫是否能正常運作,且不改變其行為。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- api
- Issue 類型
- 重構
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100