[Post-7.0] Improve readability of `Array.from` / `TypedArray.from` `mapFn` parameters
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 88/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
internal/bundled/libs/lib.es2015.iterable.d.ts#L107 から始めて、Array.from と TypedArray.from の mapFn 宣言を見つけます。パラメーター名をリンク先の MDN の説明と比較し、両方の宣言が型や動作を変更せずに、要素とインデックスに説明的な名前を使用していることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Currently, the mapFn argument of Array.from() is typed as (v: T, k: number) => U.
However, when this information is displayed in an IDE tooltip, it is difficult to grasp what values are passed to v and k.
To improve clarity, I propose changing the type definition to (element: T, index: number) => U, following the description of the same method in MDN Web Docs. The same applies to TypedArray.from().
Supplementary Information:
- The target file is
internal/bundled/libs/lib.es2015.iterable.d.ts#L107. - These changes are not intended to fix differences between 6.0 and 7.0, and according to
CONTRIBUTING.md, the Pull Request should be submitted after the 7.0 release. I plan to submit a Pull Request for this once 7.0 is released.
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 106
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/TypeScript#64322 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
Possible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TypeScript#64094 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#63959 · コメント 5 件 ·
microsoft/TypeScript の issue をすべて見る
似ている issue
-
kind/bug needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
vllm-project/semantic-router#4024 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
alexgorbatchev/dotfiles#107 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100