event handlers are not typed
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- frontend
調査の方向性
projects/plotly/src/lib/plotly.component.ts の 80 行目付近にある output の宣言と、241 行目付近にある emission から始めます。plotlyClick output から emit されるイベント payload を追跡し、チャートデータに対して十分に広い、実用的な TypeScript 型を outputs に付与します。完了条件は、emitted data の表現を維持したまま、consumer がイベントを void として認識しなくなることです。
索引モデルが issue の本文から書いたものです。
説明
I was attempting to implement some drill down functionality in the charts in my dashboard. Unfortunately, when I bound a method in my component to the (plotlyClick) output, I noticed that the type of $event was void. But my component method typed the event as unknown anyway, and I console.log the event object, and there is a ton of information in there.
On this line: https://github.com/plotly/angular-plotly.js/blob/master/projects/plotly/src/lib/plotly.component.ts#L241
...I can see that the output indeed is emitting data, just like my logging indicated. Is there anyway we could get these outputs typed? I imagine that the type would be pretty broad due to the amount of different charts/maps out there. But TypeScript thinking that the output is void is probably worse then just not knowing what the event data looks like, but still acknowledging its existence.
- 主要言語
- TypeScript
- スター
- 242
- フォーク
- 81
- 平均マージ
- 8時間 48分
- マージ済み PR(30日)
- 18
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/angular-plotly.js のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
plotly/angular-plotly.js#285 · コメント 3 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
plotly/angular-plotly.js#281 · コメント 8 件 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
plotly/angular-plotly.js#278 · コメント 2 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
plotly/angular-plotly.js#276 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
plotly/angular-plotly.js#273 · リアクション 1 件 ·