HowProgrammingWorks / HowProgrammingWorks/AsynchronousProgramming
`.do` arguments not passed correctly
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 23
- フォーク
- 26
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
The current implementation of the callback chain in 5a-chain passes data from the previous callback but doesn't pass arguments explicitly mentioned in .do().
In usage example readConfig callback is expected to receive myConfig as an argument.
const startChain = chain()
.do(readConfig, 'myConfig')
.do(selectFromDb, 'select * from cities')
.do(getHttpPage, 'http://kpi.ua')
.do(readFile, 'README.md');
However it receives undefined instead.
So if callbacks would really depend on the previous one the chain would fail once it was called.
Also, should only the first callback in the chain receive an explicit argument, and the following ones receive their arguments from the previous one? Or should they receive both explicit and implicit arguments?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、5a-chain の callback チェーン実装と、readConfig、selectFromDb、getHttpPage、readFile を示している使用例を調べます。各 .do() 呼び出しを通じて引数がどのように渡されるかを追跡し、その後、ドキュメント化された callback が undefined ではなく、期待される明示的な引数と前の callback の引数を受け取ることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100