microsoft / microsoft/TypeScript

`ReadonlyMap` lacks documentation for `forEach`, `get`, `has` and `size`

オープン 初心者向け
#63,710 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Domain: lib.d.ts Possible Improvement
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

### ⚙ Compilation target

ES2015+

### ⚙ Library

lib.es2015.collection.d.ts

### Missing / Incorrect Definition

`ReadonlyMap` lacks documentation for `forEach`, `get`, `has` and `size`.

Hovering these members in an editor shows no description, unlike the corresponding members of `Map`. The documentation should ideally be copied from regular `Map` for consistency, exactly as was done for `ReadonlySet` in #63481 (fixed by #63483).

Note: the `ReadonlyMap` members declared in lib.es2015.iterable.d.ts (`entries`, `keys`, `values` and `[Symbol.iterator]`) are already documented; only the four members declared in lib.es2015.collection.d.ts lack documentation.

### Sample Code

```ts
declare const m: ReadonlyMap;

// Hover any of these: no documentation is shown
m.get("a");
m.has("a");
m.size;
m.forEach(v => console.log(v));
```

### Documentation Link

_No response_

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

lib.es2015.collection.d.ts を開き、Map に記載されているメンバーと、ReadonlyMap の forEach、get、has、size を比較します。#63481/#63483 の ReadonlySet のドキュメント変更について、一貫性を確認します。完了の条件は、エディターのホバーで、対応する Map のドキュメントと一致する説明が4つすべての ReadonlyMap メンバーに対して表示されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
documentation
issue の種類
ドキュメント
難易度
1/5
見積もり時間
1時間未満
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
90/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。